summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
diff options
context:
space:
mode:
authorFelipe Heidrich <fheidric>2010-10-21 15:03:16 +0000
committerFelipe Heidrich <fheidric>2010-10-21 15:03:16 +0000
commit550e8a8e9bc83f6157c95ef4f9d89d7b16a7ca9e (patch)
tree81960ba6dd1ab7b61beb456413f48f904309f688 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
parenta4bbd67cab044afd6baa06e06152d08898b8d5a8 (diff)
downloadeclipse.platform.swt-550e8a8e9bc83f6157c95ef4f9d89d7b16a7ca9e.tar.gz
eclipse.platform.swt-550e8a8e9bc83f6157c95ef4f9d89d7b16a7ca9e.tar.xz
eclipse.platform.swt-550e8a8e9bc83f6157c95ef4f9d89d7b16a7ca9e.zip
Bug 328290 - Need some way to intercept 'fixfocus'
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
index 2c66f602b9..93fcdde884 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
@@ -949,8 +949,15 @@ void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, De
void fixFocus (Control focusControl) {
Shell shell = getShell ();
Control control = this;
- while (control != shell && (control = control.parent) != null) {
- if (control.setFixedFocus ()) return;
+ Display display = this.display;
+ boolean oldFixFocus = display.fixFocus;
+ display.fixFocus = true;
+ try {
+ while (control != shell && (control = control.parent) != null) {
+ if (control.setFocus ()) return;
+ }
+ } finally {
+ display.fixFocus = oldFixFocus;
}
shell.setSavedFocus (focusControl);
OS.SetFocus (0);
@@ -2978,11 +2985,6 @@ public void setEnabled (boolean enabled) {
if (fixFocus) fixFocus (control);
}
-boolean setFixedFocus () {
- if ((style & SWT.NO_FOCUS) != 0) return false;
- return forceFocus ();
-}
-
/**
* Causes the receiver to have the <em>keyboard focus</em>,
* such that all keyboard events will be delivered to it. Focus