mirror of
https://github.com/swaywm/sway.git
synced 2025-11-05 13:29:51 -05:00
Rename workspace_outputs to workspace_configs and fix memory leak
When we eventually implement `workspace <ws> gaps inner|outer <px>`, we'll need to store the gaps settings for workspaces before they're created. Rather than create a workspace_gaps struct, the approach I'm taking is to rename workspace_outputs to workspace_configs and then add gaps settings to that. I've added a lookup function workspace_find_config. Note that we have a similar thing for outputs (output_config struct and output_find_config). Lastly, when freeing config it would create a memory leak by freeing the list items but not the workspace or output names inside them. This has been rectified using a free_workspace_config function.
This commit is contained in:
parent
1698260533
commit
138d10d5d6
5 changed files with 66 additions and 47 deletions
|
|
@ -48,6 +48,8 @@ struct sway_workspace {
|
|||
|
||||
extern char *prev_workspace_name;
|
||||
|
||||
struct workspace_config *workspace_find_config(const char *ws_name);
|
||||
|
||||
struct sway_output *workspace_get_initial_output(const char *name);
|
||||
|
||||
struct sway_workspace *workspace_create(struct sway_output *output,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue