[gnome-shell-extensions] Dock: more fixes for 2.91.6
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] Dock: more fixes for 2.91.6
- Date: Sun, 20 Feb 2011 17:46:11 +0000 (UTC)
commit b289b0fdeebea1c4e125623ce80ce5a61e6d8d93
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sun Feb 20 18:42:30 2011 +0100
Dock: more fixes for 2.91.6
Fix the behavior of the PopupMenu after the conversion of
St.Clickable to St.Button, and fix the invocation of ShellApp.open_new_window(),
which now accepts a workspace index as a number (as a side effect,
"New window" means one the current workspace now).
extensions/dock/extension.js | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/extensions/dock/extension.js b/extensions/dock/extension.js
index 220b9e6..6c377c7 100644
--- a/extensions/dock/extension.js
+++ b/extensions/dock/extension.js
@@ -260,6 +260,8 @@ DockIcon.prototype = {
this._menuTimeoutId = Mainloop.timeout_add(AppDisplay.MENU_POPUP_TIMEOUT, Lang.bind(this, function() {
this.popupMenu();
}));
+ } else if (button == 3) {
+ this.popupMenu();
}
},
@@ -274,8 +276,6 @@ DockIcon.prototype = {
launchWorkspace.activate(global.get_current_time());
this.emit('launching');
this.app.open_new_window(-1);
- } else if (button == 3) {
- this.popupMenu();
}
return false;
},
@@ -335,7 +335,8 @@ DockIcon.prototype = {
if (modifiers & Clutter.ModifierType.CONTROL_MASK
&& this.app.state == Shell.AppState.RUNNING) {
- this.app.open_new_window();
+ let current_workspace = global.screen.get_active_workspace().index();
+ this.app.open_new_window(current_workspace);
} else {
let tracker = Shell.WindowTracker.get_default();
let focusedApp = tracker.focus_app;
@@ -430,7 +431,8 @@ DockIconMenu.prototype = {
let metaWindow = child._window;
this.emit('activate-window', metaWindow);
} else if (child == this._newWindowMenuItem) {
- this._source.app.open_new_window();
+ let current_workspace = global.screen.get_active_workspace().index();
+ this._source.app.open_new_window(current_workspace);
this.emit('activate-window', null);
} else if (child == this._quitAppMenuItem) {
this._source.app.request_quit();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]