diff options
author | Victor Kareh <[email protected]> | 2025-07-30 06:45:30 -0400 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2025-10-06 12:04:32 +0000 |
commit | 158e2e64b7fe584ea8fe782e4608df25d6103fc3 (patch) | |
tree | 6a0d865c9c36d9acc80d401fcaf9fb141f0b9a53 /src/core/workspace.c | |
parent | ee2adf9fcbe03f2b7d0afd62cefe0b77784f618a (diff) | |
download | marco-158e2e64b7fe584ea8fe782e4608df25d6103fc3.tar.bz2 marco-158e2e64b7fe584ea8fe782e4608df25d6103fc3.tar.xz |
Adds GNOME3-style dynamic workspace management. Workspaces are created
when no empty ones exist and removed when multiple empty workspaces are
present, maintaining exactly one empty workspace at the end.
Fixes #406
Diffstat (limited to 'src/core/workspace.c')
-rw-r--r-- | src/core/workspace.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/workspace.c b/src/core/workspace.c index 3b640cd1..556899e8 100644 --- a/src/core/workspace.c +++ b/src/core/workspace.c @@ -27,6 +27,7 @@ #include "workspace.h" #include "errors.h" #include "prefs.h" +#include "screen-private.h" #include <X11/Xatom.h> #include <string.h> #include <canberra-gtk.h> @@ -217,6 +218,9 @@ meta_workspace_add_window (MetaWorkspace *workspace, * the relevant struts */ meta_window_queue (window, META_QUEUE_CALC_SHOWING|META_QUEUE_MOVE_RESIZE); + + /* Update dynamic workspaces (this will add a new workspace if necessary) */ + meta_screen_update_dynamic_workspaces (workspace->screen); } void @@ -263,6 +267,9 @@ meta_workspace_remove_window (MetaWorkspace *workspace, * the relevant struts */ meta_window_queue (window, META_QUEUE_CALC_SHOWING|META_QUEUE_MOVE_RESIZE); + + /* Update dynamic workspaces (this will remove an empty workspace if necessary) */ + meta_screen_update_dynamic_workspaces (workspace->screen); } void |