From 28e0207f6d361364d69ff3a0564e34b7382985b5 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:29:53 +0000 Subject: Workaround for mac full screen bug git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@348 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pdf-over-gui/src/main') 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(); -- cgit v1.2.3