Implement MetaAltTabHandler
This is a fairly simple implementation, not all that different from plain metacity's. Further improvements could be made to js/ui/altTab.js in the future. http://bugzilla.gnome.org/show_bug.cgi?id=580917
This commit is contained in:
@ -5,6 +5,7 @@ const Mainloop = imports.mainloop;
|
||||
const Meta = imports.gi.Meta;
|
||||
const Shell = imports.gi.Shell;
|
||||
|
||||
const AltTab = imports.ui.altTab;
|
||||
const Main = imports.ui.main;
|
||||
const Tweener = imports.ui.tweener;
|
||||
|
||||
@ -77,6 +78,11 @@ WindowManager.prototype = {
|
||||
function(o, actor) {
|
||||
me._destroyWindowDone(actor);
|
||||
});
|
||||
|
||||
this._shellwm.connect('begin-alt-tab',
|
||||
function(o, handler) {
|
||||
me._beginAltTab(handler);
|
||||
});
|
||||
},
|
||||
|
||||
_shouldAnimate : function(actor) {
|
||||
@ -365,6 +371,14 @@ WindowManager.prototype = {
|
||||
switchData.outGroup.destroy();
|
||||
|
||||
this._shellwm.completed_switch_workspace();
|
||||
}
|
||||
},
|
||||
|
||||
_beginAltTab : function(handler) {
|
||||
let popup = new AltTab.AltTabPopup();
|
||||
|
||||
handler.connect('window-added', function(handler, window) { popup.addWindow(window); });
|
||||
handler.connect('show', function(handler, initialSelection) { popup.show(initialSelection); });
|
||||
handler.connect('destroy', function() { popup.destroy(); });
|
||||
handler.connect('notify::selected', function() { popup.select(handler.selected); });
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user