Bug 480770: Wrong focus behavior in Search dialog (and others)

Revert "Bug 471329: [GTK] Flipped button order and default button"

This reverts commit 39342ffc9e64b250c13f32265b898e0c6e960a40.

Change-Id: Ia6018174367ee4677162cbde8a3decb7e51e92f4
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java
index 328c55d..bf73f49 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java
@@ -523,6 +523,16 @@
 	if (savedFocus != null && savedFocus.isDisposed ()) savedFocus = null;
 	boolean restored = savedFocus != null && savedFocus.setFocus ();
 	savedFocus = null;
+	/*
+	* This code is intentionally commented.  When no widget
+	* has been given focus, some platforms give focus to the
+	* default button.  
+	*/
+//	if (restored) return true;
+//	if (defaultButton != null && !defaultButton.isDisposed ()) {
+//		if (defaultButton.setFocus ()) return true;
+//	}
+//	return false;
 	return restored;
 }
 
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index 45c58c4..d65af5c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -1635,26 +1635,7 @@
 		Shell.class.cast(getParent()).open();
 	setVisible (true);
 	if (isDisposed ()) return;
-	/*
-	 * When no widget has been given focus, or another push button has focus,
-	 * give focus to the default button. This avoids overriding the default
-	 * button.
-	 */
-	boolean restored = restoreFocus ();
-	if (!restored) {
-		restored = traverseGroup (true);
-	}
-	if (restored) {
-		Control focusControl = display.getFocusControl ();
-		if (focusControl instanceof Button && (focusControl.style & SWT.PUSH) != 0) {
-			restored = false;
-		}
-	}
-	if (!restored && defaultButton != null && !defaultButton.isDisposed ()) {
-		defaultButton.setFocus ();
-		return;
-	}
-	setFocus ();
+	if (!restoreFocus () && !traverseGroup (true)) setFocus ();
 }
 
 @Override