Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Unified Diff: editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/OmniBoxControlContribution.java

Issue 10544210: Fix for ubuntu searchbox focus stickiness (dartbug.com/1675). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/SearchBoxUtils.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/OmniBoxControlContribution.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/OmniBoxControlContribution.java (revision 8804)
+++ editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/OmniBoxControlContribution.java (working copy)
@@ -36,6 +36,7 @@
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
@@ -204,7 +205,12 @@
if (previousFocusControl != null && !previousFocusControl.isDisposed()) {
previousFocusControl.setFocus();
} else {
- textControl.getParent().setFocus();
+ Shell activeWorkbenchShell = SearchBoxUtils.getActiveWorkbenchShell();
+ if (activeWorkbenchShell != null) {
+ activeWorkbenchShell.setFocus();
+ } else {
+ Activator.log("no active workbench shell for searchbox defocus");
+ }
}
}
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/SearchBoxUtils.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698