[gnome-shell] Make clicking on the active workspace thumbnail go to the main view
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Make clicking on the active workspace thumbnail go to the main view
- Date: Fri, 11 Feb 2011 17:13:52 +0000 (UTC)
commit 2d716041f160a9960e18207fbbb6a52dd98e9087
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Wed Feb 9 17:43:09 2011 -0500
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
js/ui/workspaceThumbnail.js | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index 7e46a28..df6ab10 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -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,8 +280,12 @@ WorkspaceThumbnail.prototype = {
return clone;
},
- _onCloneSelected : function (clone, time) {
- this.metaWorkspace.activate(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);
},
// Draggable target interface
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]