aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/tree/workspace.h
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-28 21:58:23 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-28 22:35:38 +1000
commit138d10d5d62a25c2e00bd9051c835b9e78a36de4 (patch)
treed967c524a4016695a48a48534ee3dac17c28e038 /include/sway/tree/workspace.h
parentMerge pull request #2720 from swaywm/swaylock-shadow (diff)
downloadsway-138d10d5d62a25c2e00bd9051c835b9e78a36de4.tar.gz
sway-138d10d5d62a25c2e00bd9051c835b9e78a36de4.tar.zst
sway-138d10d5d62a25c2e00bd9051c835b9e78a36de4.zip
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.
Diffstat (limited to 'include/sway/tree/workspace.h')
-rw-r--r--include/sway/tree/workspace.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h
index e4b616d1..c8220b39 100644
--- a/include/sway/tree/workspace.h
+++ b/include/sway/tree/workspace.h
@@ -48,6 +48,8 @@ struct sway_workspace {
48 48
49extern char *prev_workspace_name; 49extern char *prev_workspace_name;
50 50
51struct workspace_config *workspace_find_config(const char *ws_name);
52
51struct sway_output *workspace_get_initial_output(const char *name); 53struct sway_output *workspace_get_initial_output(const char *name);
52 54
53struct sway_workspace *workspace_create(struct sway_output *output, 55struct sway_workspace *workspace_create(struct sway_output *output,