ctrlAltTab: Add a "Windows" option to Ctrl+Alt+Tab

This lets accessibility users easily access the desktop after focusing the panel.

https://bugzilla.gnome.org/show_bug.cgi?id=689653
This commit is contained in:
Jasper St. Pierre 2012-12-04 13:46:47 -05:00
parent 4728105f43
commit 349c642d10

View File

@ -26,6 +26,9 @@ const CtrlAltTabManager = new Lang.Class({
_init: function() {
this._items = [];
this.addGroup(global.window_group, _("Windows"),
'emblem-documents-symbolic', { sortGroup: SortGroup.TOP,
focusCallback: Lang.bind(this, this._focusWindows) });
},
addGroup: function(root, name, icon, params) {
@ -121,6 +124,12 @@ const CtrlAltTabManager = new Lang.Class({
this._popup = null;
}));
}
},
_focusWindows: function(timestamp) {
global.set_stage_input_mode(Shell.StageInputMode.NORMAL);
global.stage.key_focus = null;
global.screen.focus_default_window(timestamp);
}
});