From b7b74f44003d005490bb544353a2610f671933fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Bie=C5=84kowski?= Date: Thu, 8 Mar 2018 21:49:56 +0100 Subject: [PATCH] Do not cycle through the empty, new workspace in dynamic workspaces (#190) --- src/WindowManager.vala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/WindowManager.vala b/src/WindowManager.vala index ce2950e4..3a30247b 100644 --- a/src/WindowManager.vala +++ b/src/WindowManager.vala @@ -364,9 +364,12 @@ namespace Gala { var direction = (binding.get_name () == "cycle-workspaces-next" ? 1 : -1); var index = screen.get_active_workspace_index () + direction; + + int dynamic_offset = Prefs.get_dynamic_workspaces () ? 1 : 0; + if (index < 0) - index = screen.get_n_workspaces () - 1; - else if (index > screen.get_n_workspaces () - 1) + index = screen.get_n_workspaces () - 1 - dynamic_offset; + else if (index > screen.get_n_workspaces () - 1 - dynamic_offset) index = 0; screen.get_workspace_by_index (index).activate (display.get_current_time ());