Skip to content

Commit fcce1ac

Browse files
committed
Shells no longer set their image on Mac, so that they don't hijack the dock icon.
1 parent d4f835b commit fcce1ac

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Added `FlatBtn.setBackground` and `FlatBtn.setSelection`.
66
- Added `Shells.dontSetPositionOrSize` and `Shells.setCloseOnEscape`.
77
- Shells now reposition themselves if they were going to open offscreen.
8+
- Shells no longer set their image on Mac, so that they don't hijack the dock icon.
89
- Added `ControlWrapper.transparent` for efficiently passing `Control` to `ControlWrapper`.
910
- Improved `StructuredDrop.handler`.
1011

durian-swt/src/main/java/com/diffplug/common/swt/Shells.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
import com.diffplug.common.base.Preconditions;
3838
import com.diffplug.common.collect.Maps;
39+
import com.diffplug.common.swt.os.WS;
3940
import com.diffplug.common.tree.TreeIterable;
4041
import com.diffplug.common.tree.TreeQuery;
4142
import com.diffplug.common.tree.TreeStream;
@@ -354,7 +355,7 @@ private void setupShell(Shell shell) {
354355
if (title != null) {
355356
shell.setText(title);
356357
}
357-
if (image != null) {
358+
if (image != null && WS.getRunning() != WS.COCOA) {
358359
shell.setImage(image);
359360
}
360361
if (alpha != SWT.DEFAULT) {

0 commit comments

Comments
 (0)