[workspaces] Only allow mouse clicks to swich for empty workspaces
Allowing it in the case of 1 window is weird - it makes it feel like a bug when you go from 1 to 2.
This commit is contained in:
parent
54168fcd31
commit
4a0fbf03a8
@ -625,10 +625,11 @@ Workspace.prototype = {
|
|||||||
this._desktop.connect('selected',
|
this._desktop.connect('selected',
|
||||||
Lang.bind(this,
|
Lang.bind(this,
|
||||||
function(clone, time) {
|
function(clone, time) {
|
||||||
// Only switch to the workspace when one window is open
|
// Only switch to the workspace when there's no application windows
|
||||||
// We check for "2" here because the Desktop does not really count
|
// open (we always have one window for the desktop). The problem
|
||||||
// as a window in this context.
|
// is that it's too easy to miss an app window and get the wrong
|
||||||
if (this._windows.length <= 2) {
|
// one focused.
|
||||||
|
if (this._windows.length == 1) {
|
||||||
this.metaWorkspace.activate(time);
|
this.metaWorkspace.activate(time);
|
||||||
Main.overview.hide();
|
Main.overview.hide();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user