Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Northover2002-05-01 14:46:29 +0000
committerSteve Northover2002-05-01 14:46:29 +0000
commit5d927583013ccf1e43a6ff654e51e755248469f1 (patch)
tree1b72f852a4df9208ebb94b5ae2b7d8f676cd4360 /bundles
parentfebba76d8f57f108e6ecef219f66a40d6abf59f0 (diff)
downloadeclipse.platform.swt-5d927583013ccf1e43a6ff654e51e755248469f1.tar.gz
eclipse.platform.swt-5d927583013ccf1e43a6ff654e51e755248469f1.tar.xz
eclipse.platform.swt-5d927583013ccf1e43a6ff654e51e755248469f1.zip
*** empty log message ***
Diffstat (limited to 'bundles')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java16
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java2
2 files changed, 12 insertions, 6 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java
index 7cfcc008c5..01ee896c47 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java
@@ -347,11 +347,17 @@ boolean restoreFocus () {
if (savedFocus != null && savedFocus.isDisposed ()) savedFocus = null;
boolean restored = savedFocus != null && savedFocus.setFocus ();
savedFocus = null;
- if (restored) return true;
- if (defaultButton != null && !defaultButton.isDisposed ()) {
- if (defaultButton.setFocus ()) return true;
- }
- return false;
+ /*
+ * This code is intentionally commented. When no widget
+ * has been given focus, some platforms give focus to the
+ * default button. Motif doesn't do this.
+ */
+// if (restored) return true;
+// if (defaultButton != null && !defaultButton.isDisposed ()) {
+// if (defaultButton.setFocus ()) return true;
+// }
+// return false;
+ return restored;
}
void remove (Menu menu) {
if (menus == null) return;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
index 751113c60e..39765254a3 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
@@ -675,7 +675,7 @@ boolean restoreFocus () {
/*
* This code is intentionally commented. When no widget
* has been given focus, some platforms give focus to the
- * default button. This is unwanted on Windows.
+ * default button. Windows doesn't do this.
*/
// if (defaultButton != null && !defaultButton.isDisposed ()) {
// if (defaultButton.setFocus ()) return true;

Back to the top