diff options
author | minus <minus@mnus.de> | 2019-02-22 22:26:40 +0100 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2019-02-23 21:40:03 -0500 |
commit | 713883f04cf1f2a2bafb389562a79d98b87909e9 (patch) | |
tree | 9e06dcdf327271eb645bec5d5508ed0cdc84faf7 /sway/tree | |
parent | ipc: add missing fields to disabled outputs (diff) | |
download | sway-713883f04cf1f2a2bafb389562a79d98b87909e9.tar.gz sway-713883f04cf1f2a2bafb389562a79d98b87909e9.tar.zst sway-713883f04cf1f2a2bafb389562a79d98b87909e9.zip |
Fix crash exiting fullscreened floating container
container_floating_move_to_center and container_fullscreen_disable were
calling recursively when the container spawned as a fullscreen floating
container (via for_window). Such a window now doesn't crash sway anymore
but is still configured with a wrong, zero size, making it not directly
usable.
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 933907f4..d448df22 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -847,16 +847,9 @@ void container_floating_move_to_center(struct sway_container *con) { | |||
847 | return; | 847 | return; |
848 | } | 848 | } |
849 | struct sway_workspace *ws = con->workspace; | 849 | struct sway_workspace *ws = con->workspace; |
850 | enum sway_fullscreen_mode fullscreen_mode = con->fullscreen_mode; | ||
851 | if (fullscreen_mode) { | ||
852 | container_fullscreen_disable(con); | ||
853 | } | ||
854 | double new_lx = ws->x + (ws->width - con->width) / 2; | 850 | double new_lx = ws->x + (ws->width - con->width) / 2; |
855 | double new_ly = ws->y + (ws->height - con->height) / 2; | 851 | double new_ly = ws->y + (ws->height - con->height) / 2; |
856 | container_floating_translate(con, new_lx - con->x, new_ly - con->y); | 852 | container_floating_translate(con, new_lx - con->x, new_ly - con->y); |
857 | if (fullscreen_mode) { | ||
858 | container_set_fullscreen(con, fullscreen_mode); | ||
859 | } | ||
860 | } | 853 | } |
861 | 854 | ||
862 | static bool find_urgent_iterator(struct sway_container *con, void *data) { | 855 | static bool find_urgent_iterator(struct sway_container *con, void *data) { |