From 0078a6fa36d65704c55d426d022768e15b33a240 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 9 Aug 2015 20:49:19 -0400 Subject: Flesh out fullscreen support a bit --- sway/commands.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sway/commands.c') diff --git a/sway/commands.c b/sway/commands.c index b7794087..cee8bf84 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -224,7 +224,8 @@ int cmd_fullscreen(struct sway_config *config, int argc, char **argv) { } swayc_t *container = get_focused_container(&root_container); - wlc_view_set_state(container->handle, WLC_BIT_FULLSCREEN, true); + bool current = (wlc_view_get_state(container->handle) & WLC_BIT_FULLSCREEN) > 0; + wlc_view_set_state(container->handle, WLC_BIT_FULLSCREEN, !current); arrange_windows(container, -1, -1); return 1; -- cgit v1.2.3