diff options
author | Kevin Barnes <krbarnes> | 2009-09-29 20:44:23 +0000 |
---|---|---|
committer | Kevin Barnes <krbarnes> | 2009-09-29 20:44:23 +0000 |
commit | a5a51bcaab04ebde39e2967fe01c0175cf717dfa (patch) | |
tree | 9c0ae4569c11ad1a92f9dd9fa4a09217c2fec41a | |
parent | 370cf1595dfb69c7180c7cbfc71bbc85fce04050 (diff) | |
download | eclipse.platform.swt-a5a51bcaab04ebde39e2967fe01c0175cf717dfa.tar.gz eclipse.platform.swt-a5a51bcaab04ebde39e2967fe01c0175cf717dfa.tar.xz eclipse.platform.swt-a5a51bcaab04ebde39e2967fe01c0175cf717dfa.zip |
290759 - Shell.setEnabled(false) not implemented on Cocoa
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java | 4 | ||||
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java index bbcf61624d..90075f94ad 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java @@ -1181,8 +1181,8 @@ void fixFocus (Control focusControl) { if (control.setFocus ()) return; } shell.setSavedFocus (focusControl); -// int window = OS.GetControlOwner (handle); -// OS.ClearKeyboardFocus (window); + NSWindow window = view.window(); + window.makeFirstResponder(window); } void flagsChanged (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { 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 8a9db6d71e..97af79aca5 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 @@ -1941,7 +1941,7 @@ void windowSendEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) { } boolean windowShouldClose(int /*long*/ id, int /*long*/ sel, int /*long*/ window) { - closeWidget (); + if (isEnabled()) closeWidget (); return false; } |