diff --git a/v3/pkg/application/webview_window_windows.go b/v3/pkg/application/webview_window_windows.go index 88494efd9..c1389b91c 100644 --- a/v3/pkg/application/webview_window_windows.go +++ b/v3/pkg/application/webview_window_windows.go @@ -90,7 +90,10 @@ func (w *windowsWebviewWindow) setAbsolutePosition(x int, y int) { func (w *windowsWebviewWindow) absolutePosition() (int, int) { rect := w32.GetWindowRect(w.hwnd) - left, right := w.scaleToDefaultDPI(int(rect.Left), int(rect.Right)) + borderSizes := w.getBorderSizes() + x := int(rect.Left) + borderSizes.Left + y := int(rect.Top) + borderSizes.Top + left, right := w.scaleToDefaultDPI(x, y) return left, right } @@ -415,6 +418,10 @@ func (w *windowsWebviewWindow) relativePosition() (int, int) { x := int(rect.Left) - int(monitorInfo.RcWork.Left) y := int(rect.Top) - int(monitorInfo.RcWork.Top) + borderSize := w.getBorderSizes() + x += borderSize.Left + y += borderSize.Top + return w.scaleToDefaultDPI(x, y) }