[gnome-shell] altTab: honor switch_*_backward key binding actions
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] altTab: honor switch_*_backward key binding actions
- Date: Wed, 6 Jul 2011 12:45:26 +0000 (UTC)
commit 8db1ff8aef7c6ed6522860caa798d4b621be756f
Author: Rui Matos <tiagomatos gmail com>
Date: Tue Jul 5 23:05:45 2011 +0100
altTab: honor switch_*_backward key binding actions
https://bugzilla.gnome.org/show_bug.cgi?id=650452
js/ui/altTab.js | 12 ++++++++++--
js/ui/windowManager.js | 4 +++-
2 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index 8c01231..5084ca7 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -119,7 +119,7 @@ AltTabPopup.prototype = {
}
},
- show : function(backward, switch_group) {
+ show : function(backward, binding) {
let tracker = Shell.WindowTracker.get_default();
let apps = tracker.get_running_apps ('');
@@ -150,7 +150,7 @@ AltTabPopup.prototype = {
this.actor.get_allocation_box();
// Make the initial selection
- if (switch_group) {
+ if (binding == 'switch_group') {
if (backward) {
this._select(0, this._appIcons[0].cachedWindows.length - 1);
} else {
@@ -159,6 +159,10 @@ AltTabPopup.prototype = {
else
this._select(0, 0);
}
+ } else if (binding == 'switch_group_backward') {
+ this._select(0, this._appIcons[0].cachedWindows.length - 1);
+ } else if (binding == 'switch_windows_backward') {
+ this._select(this._appIcons.length - 1);
} else if (this._appIcons.length == 1) {
this._select(0);
} else if (backward) {
@@ -221,8 +225,12 @@ AltTabPopup.prototype = {
this.destroy();
} else if (action == Meta.KeyBindingAction.SWITCH_GROUP) {
this._select(this._currentApp, backwards ? this._previousWindow() : this._nextWindow());
+ } else if (action == Meta.KeyBindingAction.SWITCH_GROUP_BACKWARD) {
+ this._select(this._currentApp, this._previousWindow());
} else if (action == Meta.KeyBindingAction.SWITCH_WINDOWS) {
this._select(backwards ? this._previousApp() : this._nextApp());
+ } else if (action == Meta.KeyBindingAction.SWITCH_WINDOWS_BACKWARD) {
+ this._select(this._previousApp());
} else if (this._thumbnailsFocused) {
if (keysym == Clutter.Left)
this._select(this._currentApp, this._previousWindow());
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index ea7c336..e9c1192 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -119,6 +119,8 @@ WindowManager.prototype = {
this.setKeybindingHandler('switch_to_workspace_down', Lang.bind(this, this._showWorkspaceSwitcher));
this.setKeybindingHandler('switch_windows', Lang.bind(this, this._startAppSwitcher));
this.setKeybindingHandler('switch_group', Lang.bind(this, this._startAppSwitcher));
+ this.setKeybindingHandler('switch_windows_backward', Lang.bind(this, this._startAppSwitcher));
+ this.setKeybindingHandler('switch_group_backward', Lang.bind(this, this._startAppSwitcher));
this.setKeybindingHandler('switch_panels', Lang.bind(this, this._startA11ySwitcher));
Main.overview.connect('showing', Lang.bind(this, function() {
@@ -534,7 +536,7 @@ WindowManager.prototype = {
let tabPopup = new AltTab.AltTabPopup();
- if (!tabPopup.show(backwards, binding == 'switch_group'))
+ if (!tabPopup.show(backwards, binding))
tabPopup.destroy();
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]