Skip to content

Commit 857ac0b

Browse files
ShahzaibIbrahimHeikoKlare
authored andcommitted
Shell Icon disappears on zoom change
Setting an image for a shell on top left disappears on monitor change in monitor specific scaling mode. The reason behind it was that the image was being disposed by setImages method called after setImage in handleDPIChanged. The setImages method should not have been called if there are no images present in the array. The solution is to check whether we have any images in the in the array with the null check.
1 parent 12e0564 commit 857ac0b

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

Diff for: bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1699,7 +1699,7 @@ private static void handleDPIChange(Widget widget, int newZoom, float scalingFac
16991699
}
17001700

17011701
Image[] images = decorations.getImages();
1702-
if (images != null) {
1702+
if (images != null && images.length > 0) {
17031703
decorations.setImages(images);
17041704
}
17051705

0 commit comments

Comments
 (0)