Skip to content

Commit

Permalink
[win32] Fix initialization of thread dpi awareness
Browse files Browse the repository at this point in the history
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
  • Loading branch information
akoch-yatta authored and HeikoKlare committed Oct 11, 2024
1 parent a4fe53b commit 552167f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,6 @@ public Display () {
*/
public Display (DeviceData data) {
super (data);
if (DPIUtil.isAutoScaleOnRuntimeActive()) {
setRescalingAtRuntime(true);
}
}

Control _getFocusControl () {
Expand Down Expand Up @@ -939,6 +936,9 @@ public void close () {
protected void create (DeviceData data) {
checkSubclass ();
checkDisplay (thread = Thread.currentThread (), true);
if (DPIUtil.isAutoScaleOnRuntimeActive()) {
setRescalingAtRuntime(true);
}
createDisplay (data);
register (this);
if (Default == null) Default = this;
Expand Down

0 comments on commit 552167f

Please sign in to comment.