Skip to content

Commit d675f85

Browse files
akoch-yattafedejeanne
authored andcommitted
[win32] Prevent loop with fix swt.autoScale value
This commit adapts the extraction of the correct image handle in the windows implementation when using an Image with a GC. As the image will always pass the exact zoom it needs to the GC using the autoscaled zoom together with an Image can lead to unexpected results when fixed values for swt.autoScale are passed, e.g. scaling ImageData can result in endless loops.
1 parent dd30aff commit d675f85

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3909,7 +3909,7 @@ void init(Drawable drawable, GCData data, long hDC) {
39093909
}
39103910
Image image = data.image;
39113911
if (image != null) {
3912-
data.hNullBitmap = OS.SelectObject(hDC, Image.win32_getHandle(image, DPIUtil.getZoomForAutoscaleProperty(data.nativeZoom)));
3912+
data.hNullBitmap = OS.SelectObject(hDC, Image.win32_getHandle(image, data.nativeZoom));
39133913
image.memGC = this;
39143914
}
39153915
int layout = data.layout;

0 commit comments

Comments
 (0)