Skip to content

Commit 2b554d9

Browse files
arunjose696HeikoKlare
authored andcommitted
Dont put the handles created at fixed size to zoomLevelToImageHandle
The image handles created for a given target height and width is created by passing a zoom of -1. It does not make sense to put this handle in zoomLevelToImageHandle map. Putting the handle in the map would result in the image handle to be destroyed when switching monitors.
1 parent 6d33db1 commit 2b554d9

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,8 +1636,8 @@ else if (i.alphaData != null) {
16361636
}
16371637
}
16381638

1639-
private void setImageMetadataForHandle(ImageHandle imageMetadata, Integer zoom) {
1640-
if (zoom == null)
1639+
private void setImageMetadataForHandle(ImageHandle imageMetadata, int zoom) {
1640+
if (zoom == -1)
16411641
return;
16421642
if (zoomLevelToImageHandle.containsKey(zoom)) {
16431643
SWT.error(SWT.ERROR_ITEM_NOT_ADDED);

0 commit comments

Comments
 (0)