summaryrefslogtreecommitdiff
path: root/sway/handlers.c
diff options
context:
space:
mode:
authorDrew DeVault <[email protected]>2015-08-18 18:44:50 -0400
committerDrew DeVault <[email protected]>2015-08-18 18:44:50 -0400
commitcf916bbf6fbdf75abc55d4c1abe26ed6b8153687 (patch)
treed5b001e393d5fd5aad4608a7d67784baf1c2de92 /sway/handlers.c
parent446d593b4ca5cf4ea5bbf9eaafe8a6f3521b4189 (diff)
Improvements to gaps
Diffstat (limited to 'sway/handlers.c')
-rw-r--r--sway/handlers.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 1fe2dc27..9b96a5cf 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -168,7 +168,11 @@ static bool handle_view_created(wlc_handle handle) {
}
if (newview) {
set_focused_container(newview);
- arrange_windows(newview->parent, -1, -1);
+ swayc_t *output = newview->parent;
+ while (output && output->type != C_OUTPUT) {
+ output = output->parent;
+ }
+ arrange_windows(output, -1, -1);
}
return true;
}