[gnome-shell/wip/re-search-v2: 27/33] overview: Connect app-drag signals to show/hide overview elements
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/re-search-v2: 27/33] overview: Connect app-drag signals to show/hide overview elements
- Date: Mon, 3 Dec 2012 09:57:52 +0000 (UTC)
commit 0f8597cc706a48b69ee86558473bee7b68c2223e
Author: Tanner Doshier <doshitan gmail com>
Date: Wed Aug 22 19:01:04 2012 -0500
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 | 17 +++++++++++++++++
js/ui/viewSelector.js | 7 ++++---
2 files changed, 21 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 262894f..ef9201f 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -273,6 +273,23 @@ const Overview = new Lang.Class({
this._setSideControlsVisibility(!active);
}));
+ this.connect('item-drag-begin', Lang.bind(this,
+ function() {
+ this._setSideControlsVisibility(true);
+ }));
+ this.connect('item-drag-cancelled', Lang.bind(this,
+ function() {
+ if (this._viewSelector.getSearchActive()) {
+ this._setSideControlsVisibility(false);
+ }
+ }));
+ this.connect('item-drag-end', Lang.bind(this,
+ function() {
+ if (this._viewSelector.getSearchActive()) {
+ this._setSideControlsVisibility(false);
+ }
+ }));
+
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._relayout));
this._relayout();
},
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index 0b95b88..0f640de 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -118,9 +118,6 @@ const ViewSelector = new Lang.Class({
global.focus_manager.add_group(this._searchResults.actor);
- Main.overview.connect('item-drag-begin',
- Lang.bind(this, this._resetShowAppsButton));
-
this._stageKeyPressId = 0;
Main.overview.connect('showing', Lang.bind(this,
function () {
@@ -459,6 +456,10 @@ const ViewSelector = new Lang.Class({
RemoteSearch.loadRemoteSearchProviders(Lang.bind(this, this.addSearchProvider));
},
+ getSearchActive: function() {
+ return this._searchActive;
+ },
+
addSearchProvider: function(provider) {
if (!this._shouldUseSearchProvider(provider))
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]