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
This commit is contained in:
parent
09e7ab5611
commit
7c3c6da368
@ -270,14 +270,27 @@ const Overview = new Lang.Class({
|
|||||||
|
|
||||||
this._viewSelector.connect('page-changed', Lang.bind(this,
|
this._viewSelector.connect('page-changed', Lang.bind(this,
|
||||||
function() {
|
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));
|
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._relayout));
|
||||||
this._relayout();
|
this._relayout();
|
||||||
},
|
},
|
||||||
|
|
||||||
_setSideControlsVisibility: function() {
|
_setSideControlsVisibility: function(inDrag) {
|
||||||
// Ignore the case when we're leaving the overview, since
|
// Ignore the case when we're leaving the overview, since
|
||||||
// actors will be made visible again when entering the overview
|
// actors will be made visible again when entering the overview
|
||||||
// next time, and animating them while doing so is just
|
// next time, and animating them while doing so is just
|
||||||
@ -286,8 +299,8 @@ const Overview = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
let searchActive = this._viewSelector.getSearchActive();
|
let searchActive = this._viewSelector.getSearchActive();
|
||||||
let dashVisible = !searchActive;
|
let dashVisible = !searchActive || inDrag;
|
||||||
let thumbnailsVisible = !searchActive;
|
let thumbnailsVisible = !searchActive || inDrag;
|
||||||
let trayVisible = !searchActive;
|
let trayVisible = !searchActive;
|
||||||
|
|
||||||
if (dashVisible)
|
if (dashVisible)
|
||||||
|
@ -118,9 +118,6 @@ const ViewSelector = new Lang.Class({
|
|||||||
|
|
||||||
global.focus_manager.add_group(this._searchResults.actor);
|
global.focus_manager.add_group(this._searchResults.actor);
|
||||||
|
|
||||||
Main.overview.connect('item-drag-begin',
|
|
||||||
Lang.bind(this, this._resetShowAppsButton));
|
|
||||||
|
|
||||||
this._stageKeyPressId = 0;
|
this._stageKeyPressId = 0;
|
||||||
Main.overview.connect('showing', Lang.bind(this,
|
Main.overview.connect('showing', Lang.bind(this,
|
||||||
function () {
|
function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user