From 6538f60322abc246fd9ced00b0032c03c5f05ee8 Mon Sep 17 00:00:00 2001 From: Tanner Doshier Date: Wed, 22 Aug 2012 19:01:04 -0500 Subject: [PATCH] overview: Connect app-drag signals to show/hide overview elements Anytime we begin dragging an app launcher, ensure the overview elements are showing. While searching, if an app-drag ends or is cancelled, hide the overview elements, but don't switch back to windows (which was the old behavior). https://bugzilla.gnome.org/show_bug.cgi?id=682050 --- js/ui/overview.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/js/ui/overview.js b/js/ui/overview.js index e645516cc..629da014e 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -141,6 +141,7 @@ const Overview = new Lang.Class({ this._modal = false; // have a modal grab this.animationInProgress = false; this._hideInProgress = false; + this.searchActive = false; // During transitions, we raise this to the top to avoid having the overview // area be reactive; it causes too many issues such as double clicks on @@ -240,15 +241,37 @@ const Overview = new Lang.Class({ this._viewSelector.connect('search-begin', Lang.bind(this, function() { + this.searchActive = true; this._dash.hide(); this._thumbnailsBox.hide(); })); this._viewSelector.connect('search-cancelled', Lang.bind(this, function() { + this.searchActive = false; this._dash.show(); this._thumbnailsBox.show(); })); + this.connect('app-drag-begin', + Lang.bind(this, function () { + this._dash.show(); + this._thumbnailsBox.show(); + })); + this.connect('app-drag-cancelled', + Lang.bind(this, function () { + if (this.searchActive) { + this._dash.hide(); + this._thumbnailsBox.hide(); + } + })); + this.connect('app-drag-end', + Lang.bind(this, function () { + if (this.searchActive) { + this._dash.hide(); + this._thumbnailsBox.hide(); + } + })); + Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._relayout)); this._relayout(); },