diff --git a/data/org.cinnamon.gschema.xml b/data/org.cinnamon.gschema.xml index 54b431f9af..0166d08fec 100644 --- a/data/org.cinnamon.gschema.xml +++ b/data/org.cinnamon.gschema.xml @@ -431,6 +431,11 @@ Enforce displaying the alt-tab switcher on the primary monitor instead of the active one + + false + Show windows from current monitor only + + true Move minimized windows to the end of the appSwitcher diff --git a/files/usr/share/cinnamon/cinnamon-settings/modules/cs_windows.py b/files/usr/share/cinnamon/cinnamon-settings/modules/cs_windows.py index a7780471fb..3c0c7a0f82 100755 --- a/files/usr/share/cinnamon/cinnamon-settings/modules/cs_windows.py +++ b/files/usr/share/cinnamon/cinnamon-settings/modules/cs_windows.py @@ -179,5 +179,8 @@ def update_setting(widget, pspec): widget = GSettingsSwitch(_("Show windows from all workspaces"), "org.cinnamon", "alttab-switcher-show-all-workspaces") settings.add_row(widget) + widget = GSettingsSwitch(_("Show windows from current monitor"), "org.cinnamon", "alttab-switcher-show-current-monitor") + settings.add_row(widget) + widget = GSettingsSwitch(_("Warp mouse pointer to the new focused window"), "org.cinnamon", "alttab-switcher-warp-mouse-pointer") settings.add_row(widget) diff --git a/js/ui/appSwitcher/appSwitcher.js b/js/ui/appSwitcher/appSwitcher.js index 16c2378d53..ab414723c9 100644 --- a/js/ui/appSwitcher/appSwitcher.js +++ b/js/ui/appSwitcher/appSwitcher.js @@ -64,6 +64,13 @@ function getWindowsForBinding(binding) { windows = windows.filter(Main.isInteresting); + //Switch between windows on the current monitor only + let showCurrentMonitorOnly = global.settings.get_boolean("alttab-switcher-show-current-monitor"); + + if (showCurrentMonitorOnly) { + windows = windows.filter(w => w.get_monitor() === global.screen.get_current_monitor()) + } + switch (binding.get_name()) { case 'switch-panels': case 'switch-panels-backward':