Commit f7bcde63 authored by Mitar's avatar Mitar Committed by Florian Müllner

altTab: Support cycle-group cycling only over windows in the workspace

This is consistent with the filtering done for switch-group when
org.gnome.shell.app-switcher current-workspace-only is set to true.

#3116
parent f9ad8a37
Pipeline #210630 passed with stages
in 5 minutes and 25 seconds
......@@ -525,9 +525,23 @@ var CyclerPopup = GObject.registerClass({
var GroupCyclerPopup = GObject.registerClass(
class GroupCyclerPopup extends CyclerPopup {
_init() {
this._settings = new Gio.Settings({ schema_id: 'org.gnome.shell.app-switcher' });
super._init();
}
_getWindows() {
let app = Shell.WindowTracker.get_default().focus_app;
return app ? app.get_windows() : [];
let appWindows = app ? app.get_windows() : [];
if (this._settings.get_boolean('current-workspace-only')) {
const workspaceManager = global.workspace_manager;
const workspace = workspaceManager.get_active_workspace();
appWindows = appWindows.filter(
window => window.located_on_workspace(workspace));
}
return appWindows;
}
_keyPressHandler(keysym, action) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment