Skip to content

Commit 1b7dd32

Browse files
committed
[win32] Always reset cached current DPIChangeEvent
This commit ensures to always reset the currently cached DPIChangeEvent of a Control properly. Otherwise spawning dpi change events for multiple Controls that are related via parent->child hierarchy could lead to a currentDpiChangeEvent of the parent being canceled by the creation of the event of the child. Contributes to #2608
1 parent 79e74c7 commit 1b7dd32

File tree

1 file changed

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

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5940,13 +5940,13 @@ void sendZoomChangedEvent(Event event, Shell shell) {
59405940
notifyListeners(SWT.ZoomChanged, event);
59415941
}
59425942
} finally {
5943+
if (event == currentDpiChangeEvent) {
5944+
currentDpiChangeEvent = null;
5945+
}
59435946
if (shell.isDisposed()) {
59445947
return;
59455948
}
59465949
if (dpiExecData.decrement()) {
5947-
if (event == currentDpiChangeEvent) {
5948-
currentDpiChangeEvent = null;
5949-
}
59505950
if (event.doit) {
59515951
shell.WM_SIZE(0, 0);
59525952
}

0 commit comments

Comments
 (0)