summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Kovatch <skovatch>2010-12-06 18:46:09 +0000
committerScott Kovatch <skovatch>2010-12-06 18:46:09 +0000
commit3895288352d8a91094dd81f8cc54a234b695977e (patch)
treecf663cd18001dfe784ec9cf68010fd3ebe38b065
parent15691b25f13b4c17e6f0d8804db4806316d942e5 (diff)
downloadeclipse.platform.swt-3895288352d8a91094dd81f8cc54a234b695977e.tar.gz
eclipse.platform.swt-3895288352d8a91094dd81f8cc54a234b695977e.tar.xz
eclipse.platform.swt-3895288352d8a91094dd81f8cc54a234b695977e.zip
331474 - create SHEETs with NSDocModalWindowMask.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java1
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java8
3 files changed, 8 insertions, 2 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 eb8be2db75..4c6a50a2d1 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
@@ -4597,6 +4597,7 @@
<enum name="NSCurveToBezierPathElement" swt_gen="true"></enum>
<enum name="NSDeleteCharacter" swt_gen="true"></enum>
<enum name="NSDeviceIndependentModifierFlagsMask" swt_gen="true"></enum>
+ <enum name="NSDocModalWindowMask" swt_gen="true"></enum>
<enum name="NSDragOperationCopy" swt_gen="true"></enum>
<enum name="NSDragOperationDelete" swt_gen="true"></enum>
<enum name="NSDragOperationEvery" swt_gen="true"></enum>
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 1b0178328f..1475aa51be 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
@@ -2174,6 +2174,7 @@ public static final int NSCriticalAlertStyle = 2;
public static final int NSCurveToBezierPathElement = 2;
public static final int NSDeleteCharacter = 127;
public static final int NSDeviceIndependentModifierFlagsMask = -65536;
+public static final int NSDocModalWindowMask = 64;
public static final int NSDragOperationCopy = 1;
public static final int NSDragOperationDelete = 32;
public static final int NSDragOperationEvery = -1;
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 1830816ed7..050d018911 100755
--- 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
@@ -587,9 +587,13 @@ void createHandle () {
state |= HIDDEN;
if (window == null && view == null) {
int styleMask = OS.NSBorderlessWindowMask;
- if ((style & SWT.TOOL) != 0) {
+ if ((style & (SWT.TOOL | SWT.SHEET)) != 0) {
window = (NSWindow) new SWTPanel().alloc();
- styleMask |= OS.NSUtilityWindowMask | OS.NSNonactivatingPanelMask;
+ if ((style & SWT.SHEET) != 0) {
+ styleMask |= OS.NSDocModalWindowMask;
+ } else {
+ styleMask |= OS.NSUtilityWindowMask | OS.NSNonactivatingPanelMask;
+ }
} else {
window = (NSWindow) new SWTWindow().alloc ();
}