diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-09-30 13:45:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-30 13:45:31 +0200 |
commit | e518c5dbaf93ab4f83031e83e03823d85469a30f (patch) | |
tree | 71b27108bc8f33ae6651fef489283fb015449d1e /sway/tree/container.c | |
parent | Merge pull request #2725 from PumbaPe/add-tap-and-drag (diff) | |
parent | Move sticky containers in output_evacuate (diff) | |
download | sway-e518c5dbaf93ab4f83031e83e03823d85469a30f.tar.gz sway-e518c5dbaf93ab4f83031e83e03823d85469a30f.tar.zst sway-e518c5dbaf93ab4f83031e83e03823d85469a30f.zip |
Merge pull request #2728 from RedSoxFan/move-sticky-on-evac
Move sticky containers in output_evacuate
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r-- | sway/tree/container.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 66370a42..c30e7784 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -823,9 +823,16 @@ void container_floating_move_to_center(struct sway_container *con) { | |||
823 | return; | 823 | return; |
824 | } | 824 | } |
825 | struct sway_workspace *ws = con->workspace; | 825 | struct sway_workspace *ws = con->workspace; |
826 | bool full = con->is_fullscreen; | ||
827 | if (full) { | ||
828 | container_set_fullscreen(con, false); | ||
829 | } | ||
826 | double new_lx = ws->x + (ws->width - con->width) / 2; | 830 | double new_lx = ws->x + (ws->width - con->width) / 2; |
827 | double new_ly = ws->y + (ws->height - con->height) / 2; | 831 | double new_ly = ws->y + (ws->height - con->height) / 2; |
828 | container_floating_translate(con, new_lx - con->x, new_ly - con->y); | 832 | container_floating_translate(con, new_lx - con->x, new_ly - con->y); |
833 | if (full) { | ||
834 | container_set_fullscreen(con, true); | ||
835 | } | ||
829 | } | 836 | } |
830 | 837 | ||
831 | static bool find_urgent_iterator(struct sway_container *con, void *data) { | 838 | static bool find_urgent_iterator(struct sway_container *con, void *data) { |