diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-12-13 07:58:00 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-12-13 07:58:00 -0500 |
commit | d361ce656d314f24dd34a76387f105b94bc3fb1f (patch) | |
tree | 187e03107bbf82ca67bab86379e69e3a74eb0439 /sway | |
parent | 6655534febe2f611a9ff2d9d11c6db4688acd47b (diff) | |
download | sway-d361ce656d314f24dd34a76387f105b94bc3fb1f.tar.xz |
Track the fullscreen view on a workspace swayc_t
Diffstat (limited to 'sway')
-rw-r--r-- | sway/commands.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sway/commands.c b/sway/commands.c index 205798ec..74b307e6 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -1349,15 +1349,18 @@ static struct cmd_results *cmd_fullscreen(int argc, char **argv) { return error; } swayc_t *container = get_focused_view(&root_container); + swayc_t *workspace = swayc_parent_by_type(container, C_WORKSPACE); bool current = swayc_is_fullscreen(container); wlc_view_set_state(container->handle, WLC_BIT_FULLSCREEN, !current); // Resize workspace if going from fullscreen -> notfullscreen // otherwise just resize container if (current) { - container = swayc_parent_by_type(container, C_WORKSPACE); + arrange_windows(workspace, -1, -1); + workspace->fullscreen = container; + } else { + arrange_windows(container, -1, -1); + workspace->fullscreen = NULL; } - // Only resize container when going into fullscreen - arrange_windows(container, -1, -1); return cmd_results_new(CMD_SUCCESS, NULL, NULL); } |