diff options
author | emersion <contact@emersion.fr> | 2018-04-29 13:44:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-29 13:44:37 +0100 |
commit | 78e3bc1329e865fe8df2da77693868f38380ab30 (patch) | |
tree | 472f59488b8ae77b5f296de8d17e5ba68d4407fb /sway/desktop | |
parent | 24ab66d123ab493feb3c2343cbc9d93625b668d7 (diff) | |
parent | 976e6b99b62891a72e48fca21b93708e060c134a (diff) |
Merge pull request #1854 from RyanDwyer/refactor-arrange-windows
Refactor arrange_windows()
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/layer_shell.c | 3 | ||||
-rw-r--r-- | sway/desktop/output.c | 9 |
2 files changed, 7 insertions, 5 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c index f9a1a8bd..03419ac1 100644 --- a/sway/desktop/layer_shell.c +++ b/sway/desktop/layer_shell.c @@ -12,6 +12,7 @@ #include "sway/layers.h" #include "sway/output.h" #include "sway/server.h" +#include "sway/tree/arrange.h" #include "sway/tree/layout.h" #include "log.h" @@ -175,7 +176,7 @@ void arrange_layers(struct sway_output *output) { sizeof(struct wlr_box)) != 0) { wlr_log(L_DEBUG, "Usable area changed, rearranging output"); memcpy(&output->usable_area, &usable_area, sizeof(struct wlr_box)); - arrange_windows(output->swayc, -1, -1); + arrange_output(output->swayc); } // Arrange non-exlusive surfaces from top->bottom diff --git a/sway/desktop/output.c b/sway/desktop/output.c index b19b72df..d9ae890f 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -19,6 +19,7 @@ #include "sway/layers.h" #include "sway/output.h" #include "sway/server.h" +#include "sway/tree/arrange.h" #include "sway/tree/container.h" #include "sway/tree/layout.h" #include "sway/tree/view.h" @@ -534,19 +535,19 @@ static void handle_destroy(struct wl_listener *listener, void *data) { static void handle_mode(struct wl_listener *listener, void *data) { struct sway_output *output = wl_container_of(listener, output, mode); arrange_layers(output); - arrange_windows(output->swayc, -1, -1); + arrange_output(output->swayc); } static void handle_transform(struct wl_listener *listener, void *data) { struct sway_output *output = wl_container_of(listener, output, transform); arrange_layers(output); - arrange_windows(output->swayc, -1, -1); + arrange_output(output->swayc); } static void handle_scale(struct wl_listener *listener, void *data) { struct sway_output *output = wl_container_of(listener, output, scale); arrange_layers(output); - arrange_windows(output->swayc, -1, -1); + arrange_output(output->swayc); } void handle_new_output(struct wl_listener *listener, void *data) { @@ -598,5 +599,5 @@ void handle_new_output(struct wl_listener *listener, void *data) { output->damage_destroy.notify = damage_handle_destroy; arrange_layers(output); - arrange_windows(&root_container, -1, -1); + arrange_root(); } |