Skip to content

Commit 6c4bd61

Browse files
committed
[win32] Adjust wrong size after DPI fix in Shell
This commit addresses an issue with the logic fixing a missing DPI change event from windows in the Shell#WM_WINDOWPOSCHANGED callback. It is no longer necessary, because the causing issue is that in some scenarios a sub shell is positioned on a random monitor. Solution is to adapt the nativeZoom of the sub Shell after the handle was created.
1 parent 9eb34bf commit 6c4bd61

File tree

1 file changed

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

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,14 @@ public void close () {
553553
closeWidget ();
554554
}
555555

556+
@Override
557+
void createWidget() {
558+
super.createWidget ();
559+
if (parent != null) {
560+
this.nativeZoom = DPIUtil.mapDPIToZoom(OS.GetDpiForWindow(handle));
561+
}
562+
}
563+
556564
void createBalloonTipHandle () {
557565
balloonTipHandle = OS.CreateWindowEx (
558566
0,

0 commit comments

Comments
 (0)