diff options
author | Lakshmi Shanmugam <lshanmug@in.ibm.com> | 2012-04-26 00:37:03 +0530 |
---|---|---|
committer | Lakshmi Shanmugam <lshanmug@in.ibm.com> | 2012-04-26 00:37:03 +0530 |
commit | 9cc72cd00c181250b1f51b95a0528a6b993c1ed9 (patch) | |
tree | ecd12f43b481e4174d3d202bbb93c0603e35fb28 | |
parent | 3f75ec57b0fe8c1d4b4feda67318fc7237703447 (diff) | |
download | eclipse.platform.swt-9cc72cd00c181250b1f51b95a0528a6b993c1ed9.tar.gz eclipse.platform.swt-9cc72cd00c181250b1f51b95a0528a6b993c1ed9.tar.xz eclipse.platform.swt-9cc72cd00c181250b1f51b95a0528a6b993c1ed9.zip |
Bug 377385-[10.7]Shell.setFullScreen not working on child window
4 files changed, 12 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras index 7b1206d2e6..2038c03f8a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras @@ -4140,6 +4140,9 @@ <method selector="close" swt_gen="true"> <retval swt_gen="true"></retval> </method> + <method selector="collectionBehavior" swt_gen="true"> + <retval swt_gen="true"></retval> + </method> <method selector="contentView" swt_gen="true"> <retval swt_gen="true" swt_java_type="NSView"></retval> </method> diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWindow.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWindow.java index 4ae0424c19..c449d5039f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWindow.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWindow.java @@ -54,6 +54,10 @@ public void close() { OS.objc_msgSend(this.id, OS.sel_close); } +public int /*long*/ collectionBehavior() { + return OS.objc_msgSend(this.id, OS.sel_collectionBehavior); +} + public NSView contentView() { int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_contentView); return result != 0 ? new NSView(result) : null; diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java index 2a4ad2331c..4b1dca9fdd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java @@ -1092,6 +1092,7 @@ public static final int /*long*/ sel_closePath = sel_registerName("closePath"); public static final int /*long*/ sel_code = sel_registerName("code"); public static final int /*long*/ sel_collapseItem_ = sel_registerName("collapseItem:"); public static final int /*long*/ sel_collapseItem_collapseChildren_ = sel_registerName("collapseItem:collapseChildren:"); +public static final int /*long*/ sel_collectionBehavior = sel_registerName("collectionBehavior"); public static final int /*long*/ sel_color = sel_registerName("color"); public static final int /*long*/ sel_colorAtX_y_ = sel_registerName("colorAtX:y:"); public static final int /*long*/ sel_colorListNamed_ = sel_registerName("colorListNamed:"); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java index a6011455f2..514990843b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java @@ -1672,7 +1672,7 @@ public void setFullScreen (boolean fullScreen) { if (this.fullScreen == fullScreen) return; this.fullScreen = fullScreen; - if (OS.VERSION >= 0x1070) { + if ((window.collectionBehavior() & OS.NSWindowCollectionBehaviorFullScreenPrimary) != 0) { OS.objc_msgSend(window.id, OS.sel_toggleFullScreen_, 0); return; } @@ -2061,6 +2061,7 @@ void updateParent (boolean visible) { } void updateSystemUIMode () { + if ((window.collectionBehavior() & OS.NSWindowCollectionBehaviorFullScreenPrimary) != 0) return; if (!getMonitor ().equals (display.getPrimaryMonitor ())) return; int mode = display.systemUIMode, options = display.systemUIOptions; if (fullScreen) { @@ -2111,7 +2112,7 @@ void windowDidBecomeKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notifica if (isDisposed ()) return; if (!restoreFocus () && !traverseGroup (true)) setFocus (); if (isDisposed ()) return; - if (OS.VERSION < 0x1070) { + if ((window.collectionBehavior() & OS.NSWindowCollectionBehaviorFullScreenPrimary) == 0) { Shell parentShell = this; while (parentShell.parent != null) { parentShell = (Shell) parentShell.parent; @@ -2151,7 +2152,7 @@ void windowDidMove(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) } void windowDidResize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { - if (fullScreen && OS.VERSION < 0x1070) { + if (fullScreen && ((window.collectionBehavior() & OS.NSWindowCollectionBehaviorFullScreenPrimary) == 0)) { window.setFrame(fullScreenFrame, true); NSRect contentViewFrame = new NSRect(); contentViewFrame.width = fullScreenFrame.width; |