Skip to content

Commit 3a2a2b2

Browse files
GetLocation as Point.WithMonitor to ensure correct monitor association
Previously, dialog positioning could be incorrect if the monitor was misidentified when restoring location. By returning the shell's location as a Point.WithMonitor (including monitor reference), we ensure dialogs and secondary shells open on the intended monitor, even in multi-monitor setups. This fixes issues where dialogs could appear on the wrong monitor after moving the parent shell.
1 parent fdbb769 commit 3a2a2b2

File tree

1 file changed

+1
-1
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets

1 file changed

+1
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,7 @@ public int getImeInputMode () {
10171017
if (OS.IsIconic (handle)) return super.getLocationInPixels ();
10181018
RECT rect = new RECT ();
10191019
OS.GetWindowRect (handle, rect);
1020-
return new Point (rect.left, rect.top);
1020+
return new Point.WithMonitor (rect.left, rect.top, getMonitor());
10211021
}
10221022

10231023
@Override

0 commit comments

Comments
 (0)