Make clicking on the active workspace thumbnail go to the main view
If you want to select a workspace and go there, having to go back to the main part of the window selector and click on a window is annoying, so make a second click on the active workspace go to the main view. https://bugzilla.gnome.org/show_bug.cgi?id=641973
This commit is contained in:
parent
cd56de85d0
commit
2d716041f1
@ -146,7 +146,7 @@ WorkspaceThumbnail.prototype = {
|
||||
}));
|
||||
this.actor.connect('button-release-event', Lang.bind(this,
|
||||
function(actor, event) {
|
||||
this.metaWorkspace.activate(event.get_time());
|
||||
this._activate();
|
||||
return true;
|
||||
}));
|
||||
|
||||
@ -264,7 +264,7 @@ WorkspaceThumbnail.prototype = {
|
||||
let clone = new WindowClone(win);
|
||||
|
||||
clone.connect('selected',
|
||||
Lang.bind(this, this._onCloneSelected));
|
||||
Lang.bind(this, this._activate));
|
||||
clone.connect('drag-begin',
|
||||
Lang.bind(this, function(clone) {
|
||||
Main.overview.beginWindowDrag();
|
||||
@ -280,7 +280,11 @@ WorkspaceThumbnail.prototype = {
|
||||
return clone;
|
||||
},
|
||||
|
||||
_onCloneSelected : function (clone, time) {
|
||||
_activate : function (clone, time) {
|
||||
// a click on the already current workspace should go back to the main view
|
||||
if (this.metaWorkspace == global.screen.get_active_workspace())
|
||||
Main.overview.hide();
|
||||
else
|
||||
this.metaWorkspace.activate(time);
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user