Skip to content

Commit 552167f

Browse files
akoch-yattaHeikoKlare
authored andcommitted
[win32] Fix initialization of thread dpi awareness
This commit moves the initialization of the thread DPI awareness into the creation method. It was done too late before which resulted in all calls do Display::messageProc being executed with the wrong DPI awarness of the thread dpi awareness differs from the process DPI awareness. Contributes to eclipse-platform#62 and eclipse-platform#131
1 parent a4fe53b commit 552167f

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/Display.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -583,9 +583,6 @@ public Display () {
583583
*/
584584
public Display (DeviceData data) {
585585
super (data);
586-
if (DPIUtil.isAutoScaleOnRuntimeActive()) {
587-
setRescalingAtRuntime(true);
588-
}
589586
}
590587

591588
Control _getFocusControl () {
@@ -939,6 +936,9 @@ public void close () {
939936
protected void create (DeviceData data) {
940937
checkSubclass ();
941938
checkDisplay (thread = Thread.currentThread (), true);
939+
if (DPIUtil.isAutoScaleOnRuntimeActive()) {
940+
setRescalingAtRuntime(true);
941+
}
942942
createDisplay (data);
943943
register (this);
944944
if (Default == null) Default = this;

0 commit comments

Comments
 (0)