aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorminus <minus@mnus.de>2019-02-22 22:26:40 +0100
committerDrew DeVault <sir@cmpwn.com>2019-02-25 17:10:04 -0500
commit3924039bc09197de970a7ddb6d1ce0bc412edc84 (patch)
tree70112d94820031ab4c8367e6104b88e1db1cc5d1
parentb2abc6041a426eed78f14ad0a37a2c11aa20fe26 (diff)
downloadsway-3924039bc09197de970a7ddb6d1ce0bc412edc84.zip
sway-3924039bc09197de970a7ddb6d1ce0bc412edc84.tar.gz
sway-3924039bc09197de970a7ddb6d1ce0bc412edc84.tar.bz2
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.
-rw-r--r--sway/tree/container.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 933907f..d448df2 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) {
return;
}
struct sway_workspace *ws = con->workspace;
- enum sway_fullscreen_mode fullscreen_mode = con->fullscreen_mode;
- if (fullscreen_mode) {
- container_fullscreen_disable(con);
- }
double new_lx = ws->x + (ws->width - con->width) / 2;
double new_ly = ws->y + (ws->height - con->height) / 2;
container_floating_translate(con, new_lx - con->x, new_ly - con->y);
- if (fullscreen_mode) {
- container_set_fullscreen(con, fullscreen_mode);
- }
}
static bool find_urgent_iterator(struct sway_container *con, void *data) {