From 52998e4c2529811191f1b6fb6dc516691e28a109 Mon Sep 17 00:00:00 2001 From: Lakshmi Shanmugam Date: Mon, 23 Apr 2012 12:39:04 +0530 Subject: fixed problem with previous commit for Bug 349148 --- .../Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'bundles') 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 2e750c1e77..a6011455f2 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 @@ -729,7 +729,9 @@ void createHandle () { int behavior = 0; if (parent != null) behavior |= OS.NSWindowCollectionBehaviorMoveToActiveSpace; if (OS.VERSION >= 0x1070) { - behavior = OS.NSWindowCollectionBehaviorFullScreenPrimary; + if (parent == null) { + behavior = OS.NSWindowCollectionBehaviorFullScreenPrimary; + } } if (behavior != 0) window.setCollectionBehavior(behavior); window.setAcceptsMouseMovedEvents(true); @@ -1209,13 +1211,6 @@ void helpRequested(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { } } -void hideFullScreenButton () { - if (OS.VERSION >= 0x1070 && parent != null) { - NSButton button = window.standardWindowButton(OS.NSWindowFullScreenButton); - if (button != null) button.setHidden(true); - } -} - void invalidateVisibleRegion () { resetVisibleRegion (); if (toolBar != null) toolBar.resetVisibleRegion(); @@ -1936,8 +1931,6 @@ void setWindowVisible (boolean visible, boolean key) { OS.objc_msgSend(window.id, OS.sel__setNeedsToUseHeartBeatWindow_, 0); } } else { - // Hide fullscreen button for child window - hideFullScreenButton(); // If the parent window is miniaturized, the window will be shown // when its parent is shown. boolean parentMinimized = parent != null && parentWindow ().isMiniaturized(); @@ -2150,7 +2143,6 @@ void windowDidEnterFullScreen(int /*long*/ id, int /*long*/ sel, int /*long*/ no void windowDidExitFullScreen(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { this.fullScreen = false; - hideFullScreenButton(); } void windowDidMove(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { -- cgit