[gnome-shell/wip/re-search-v2: 25/28] overview: Connect item-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: 25/28] overview: Connect item-drag signals to show/hide overview elements
- Date: Mon, 3 Dec 2012 18:12:11 +0000 (UTC)
commit 1daca698410ac98e6a6da83d52072942a4e2505b
Author: Tanner Doshier <doshitan gmail com>
Date: Wed Aug 22 19:01:04 2012 -0500
overview: Connect item-drag signals to show/hide overview elements
Anytime we begin dragging an app launcher, ensure the overview elements are
showing. While searching, if an item-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 | 21 +++++++++++++++++----
js/ui/viewSelector.js | 3 ---
2 files changed, 17 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 3e3d892..2005124 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -270,14 +270,27 @@ const Overview = new Lang.Class({
this._viewSelector.connect('page-changed', Lang.bind(this,
function() {
- this._setSideControlsVisibility();
+ this._setSideControlsVisibility(false);
+ }));
+
+ this.connect('item-drag-begin', Lang.bind(this,
+ function() {
+ this._setSideControlsVisibility(true);
+ }));
+ this.connect('item-drag-cancelled', Lang.bind(this,
+ function() {
+ this._setSideControlsVisibility(false);
+ }));
+ this.connect('item-drag-end', Lang.bind(this,
+ function() {
+ this._setSideControlsVisibility(false);
}));
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._relayout));
this._relayout();
},
- _setSideControlsVisibility: function() {
+ _setSideControlsVisibility: function(inDrag) {
// Ignore the case when we're leaving the overview, since
// actors will be made visible again when entering the overview
// next time, and animating them while doing so is just
@@ -286,8 +299,8 @@ const Overview = new Lang.Class({
return;
let searchActive = this._viewSelector.getSearchActive();
- let dashVisible = !searchActive;
- let thumbnailsVisible = !searchActive;
+ let dashVisible = !searchActive || inDrag;
+ let thumbnailsVisible = !searchActive || inDrag;
let trayVisible = !searchActive;
if (dashVisible)
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index 978031f..9ed0f13 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 () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]