diff options
author | Victor Kareh <[email protected]> | 2025-07-30 06:45:30 -0400 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2025-08-07 15:10:56 -0400 |
commit | b7c75594dc6f44e08e1927ff5024c91a4564b784 (patch) | |
tree | 3ce585ed88525eb8afdfc6bf418e6c12d58ca5b7 /src/core/workspace.c | |
parent | 87aa5feb8790168eb7b2bc890938353116d26594 (diff) | |
download | marco-dynamic-workspaces.tar.bz2 marco-dynamic-workspaces.tar.xz |
Add dynamic workspaces supportdynamic-workspaces
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 |