summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:29:53 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:29:53 +0000
commit28e0207f6d361364d69ff3a0564e34b7382985b5 (patch)
treee5a93ae808114a6fc1f1e4f2ab4d5730c058fac3 /pdf-over-gui/src/main/java/at/asit
parentf92481fc2eaebca66d2fee92f3fa961595c7a9a3 (diff)
downloadmocca-28e0207f6d361364d69ff3a0564e34b7382985b5.tar.gz
mocca-28e0207f6d361364d69ff3a0564e34b7382985b5.tar.bz2
mocca-28e0207f6d361364d69ff3a0564e34b7382985b5.zip
Workaround for mac full screen bug
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@348 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java6
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();