diff options
Diffstat (limited to 'pdf-over-gui')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java index b65a1f17..85f223c6 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java @@ -31,6 +31,7 @@ import org.eclipse.swt.events.ShellEvent; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.ImageData; import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.internal.cocoa.NSWindow; import org.eclipse.swt.layout.FormAttachment; import org.eclipse.swt.layout.FormData; import org.eclipse.swt.layout.FormLayout; @@ -207,6 +208,11 @@ public class MainWindow { protected void createContents() { this.shell = new Shell(); this.shell.setSize(this.stateMachine.getConfigProvider().getMainWindowSize()); + if (System.getProperty("os.name").toLowerCase().contains("mac")) { //$NON-NLS-1$ //$NON-NLS-2$ + // Workaround for SWT bug on Mac: disable full screen mode + NSWindow nswindow = this.shell.view.window(); + nswindow.setCollectionBehavior(0); + } try { Display display = Display.getCurrent(); Monitor primary = display.getPrimaryMonitor(); |