workspacesView: Return from overview when tapping on an empty workspace

This works for pointers and touch on X11, there is however no pointer
emulation on evdev, so touch triggers ::clicked with button==0 which
is ignored.

https://bugzilla.gnome.org/show_bug.cgi?id=756748
This commit is contained in:
Carlos Garnacho 2015-10-16 18:00:01 +02:00
parent 3803a880e8
commit ffa8c2f2b1

View File

@ -421,7 +421,7 @@ const WorkspacesDisplay = new Lang.Class({
// Only switch to the workspace when there's no application // Only switch to the workspace when there's no application
// windows open. The problem is that it's too easy to miss // windows open. The problem is that it's too easy to miss
// an app window and get the wrong one focused. // an app window and get the wrong one focused.
if (action.get_button() == 1 && if ((action.get_button() == 1 || action.get_button() == 0) &&
this._getPrimaryView().getActiveWorkspace().isEmpty()) this._getPrimaryView().getActiveWorkspace().isEmpty())
Main.overview.hide(); Main.overview.hide();
})); }));