Last active
December 14, 2015 01:49
-
-
Save azhawkes/5009567 to your computer and use it in GitHub Desktop.
Workaround to disable SWT full-screen mode on the Mac, to get around this nasty bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=389486
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void disableFullScreen(Shell shell) { | |
try { | |
Field windowField = Shell.class.getDeclaredField("window"); | |
windowField.setAccessible(true); | |
Object window = windowField.get(shell); | |
invoke(window.getClass(), window, "setCollectionBehavior", new Long[] { 0L }); | |
} catch (Exception e) { | |
log.error("couldn't disable full screen mode", e); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment