diff options
author | 2021-06-18 12:19:18 +0200 | |
---|---|---|
committer | 2021-06-18 16:15:02 +0200 | |
commit | 3080f1b9ce069c0697291bd3ef23c38ae610fa8c (patch) | |
tree | f4312e265dd00d30be76af4b39e2daeeb9f944e5 /include | |
parent | Fix #6299 Disable auto_back_and_forth for next_on_output (diff) | |
download | sway-3080f1b9ce069c0697291bd3ef23c38ae610fa8c.tar.gz sway-3080f1b9ce069c0697291bd3ef23c38ae610fa8c.tar.zst sway-3080f1b9ce069c0697291bd3ef23c38ae610fa8c.zip |
Move auto_back_and_forth logic out of workspace_switch
This extracts the code to a separate workspace_auto_back_and_forth
function.
It also removes the bool argument by adding an extra if statement at the call
site, and repurposes the no_auto_back_and_forth variable to
auto_back_and_forth for simpler understanding.
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/tree/workspace.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h index fdd92f64..65ba247f 100644 --- a/include/sway/tree/workspace.h +++ b/include/sway/tree/workspace.h | |||
@@ -60,8 +60,10 @@ void workspace_consider_destroy(struct sway_workspace *ws); | |||
60 | 60 | ||
61 | char *workspace_next_name(const char *output_name); | 61 | char *workspace_next_name(const char *output_name); |
62 | 62 | ||
63 | bool workspace_switch(struct sway_workspace *workspace, | 63 | struct sway_workspace *workspace_auto_back_and_forth( |
64 | bool no_auto_back_and_forth); | 64 | struct sway_workspace *workspace); |
65 | |||
66 | bool workspace_switch(struct sway_workspace *workspace); | ||
65 | 67 | ||
66 | struct sway_workspace *workspace_by_number(const char* name); | 68 | struct sway_workspace *workspace_by_number(const char* name); |
67 | 69 | ||