mirror of
https://github.com/elementary/gala.git
synced 2024-10-05 19:27:25 +03:00
Do not cycle through the empty, new workspace in dynamic workspaces (#190)
This commit is contained in:
parent
f74a4c8b05
commit
b7b74f4400
@ -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 ());
|
||||
|
Loading…
Reference in New Issue
Block a user