diff options
author | Drew DeVault <[email protected]> | 2015-08-08 18:17:08 -0400 |
---|---|---|
committer | Drew DeVault <[email protected]> | 2015-08-08 18:17:08 -0400 |
commit | 6066467dff2a1c55c124f618af8a5406bfc6fac9 (patch) | |
tree | 3206799ee54eb8acdb6afe5178869a53e441e660 /sway/handlers.c | |
parent | 148f59f3a670a7008bc6c2bc07712fd58b1f6e69 (diff) |
Tile some windows baby
Diffstat (limited to 'sway/handlers.c')
-rw-r--r-- | sway/handlers.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 27087295..79cbd31d 100644 --- a/sway/handlers.c +++ b/sway/handlers.c @@ -2,6 +2,7 @@ #include <stdbool.h> #include <wlc/wlc.h> #include "layout.h" +#include "log.h" #include "handlers.h" bool handle_output_created(wlc_handle output) { @@ -14,6 +15,12 @@ void handle_output_destroyed(wlc_handle output) { } void handle_output_resolution_change(wlc_handle output, const struct wlc_size *from, const struct wlc_size *to) { + sway_log(L_DEBUG, "Output %d resolution changed to %d x %d", output, to->w, to->h); + swayc_t *c = get_swayc_for_handle(output, &root_container); + if (!c) return; + c->width = to->w; + c->height = to->h; + arrange_windows(&root_container, -1, -1); } bool handle_view_created(wlc_handle view) { |