Avoid double use of struct workspace

`struct workspace` was used both for representing an actual workspace
and for an entry of workspace configuration. Avoid it for clarity.
This commit is contained in:
tokyo4j 2026-01-31 01:24:01 +09:00 committed by Consolatis
parent 4819f47f98
commit 37618a1456
4 changed files with 39 additions and 41 deletions

View file

@ -57,6 +57,11 @@ struct usable_area_override {
struct wl_list link; /* struct rcxml.usable_area_overrides */
};
struct workspace_config {
struct wl_list link; /* struct rcxml.workspace_config.workspaces */
char *name;
};
struct rcxml {
/* from command line */
char *config_dir;
@ -170,7 +175,7 @@ struct rcxml {
int min_nr_workspaces;
char *initial_workspace_name;
char *prefix;
struct wl_list workspaces; /* struct workspace.link */
struct wl_list workspaces; /* struct workspace_config.link */
} workspace_config;
/* Regions */

View file

@ -10,12 +10,8 @@ struct seat;
struct server;
struct wlr_scene_tree;
/* Double use: as config in config/rcxml.c and as instance in workspaces.c */
struct workspace {
struct wl_list link; /*
* struct server.workspaces
* struct rcxml.workspace_config.workspaces
*/
struct wl_list link; /* struct server.workspaces */
struct server *server;
char *name;