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

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

Issue 237303002: Issue 2031. Fix that works for OSX, Windows and Linux. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 | no next file » | 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
diff --git a/editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/OmniBoxControlContribution.java b/editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/OmniBoxControlContribution.java
index 673f2e513287291b4e9ed84eda0f017d4b5bdf09..9645cd53fedfa9801ac2bdbe4eb42794f8979505 100644
--- a/editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/OmniBoxControlContribution.java
+++ b/editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/OmniBoxControlContribution.java
@@ -29,8 +29,6 @@ import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseTrackAdapter;
-import org.eclipse.swt.events.ShellAdapter;
-import org.eclipse.swt.events.ShellEvent;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
@@ -274,7 +272,8 @@ public class OmniBoxControlContribution {
//outside the search box (or popup) should cause the popup to close
//We identify this case by keying off focus changes --- if focus
//is transfered to another control we trigger a close
- if (Util.isLinux()) {
+ // scheglov: Actually we need to use "asyncExec" on Mac and Windows too.
+ {
//Exec async to ensure that it occurs after the focus change
Display.getDefault().asyncExec(new Runnable() {
@Override
@@ -426,20 +425,6 @@ public class OmniBoxControlContribution {
handleFocusLost();
}
});
-
- // close popup when Editor lost focus
- textControl.getShell().addShellListener(new ShellAdapter() {
- @Override
- public void shellDeactivated(ShellEvent e) {
- Shell activeShell = Display.getCurrent().getActiveShell();
- if (activeShell == null) {
- if (popup != null) {
- popup.close();
- popup = null;
- }
- }
- }
- });
}
private void openPopup() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698