diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-10 23:54:23 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-10 23:54:23 -0400 |
commit | 96d7ff1e19c1e6af47f21764ed613c5ebe53a557 (patch) | |
tree | 75566e3fb44600e63c1dbbec3f216425a57e70a6 /sway/layout.c | |
parent | Prevent passing WM keys, improve multihead support (diff) | |
download | sway-96d7ff1e19c1e6af47f21764ed613c5ebe53a557.tar.gz sway-96d7ff1e19c1e6af47f21764ed613c5ebe53a557.tar.zst sway-96d7ff1e19c1e6af47f21764ed613c5ebe53a557.zip |
Slightly better multihead support
Diffstat (limited to 'sway/layout.c')
-rw-r--r-- | sway/layout.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sway/layout.c b/sway/layout.c index 08d1952c..ccf29f34 100644 --- a/sway/layout.c +++ b/sway/layout.c | |||
@@ -44,10 +44,16 @@ void arrange_windows(swayc_t *container, int width, int height) { | |||
44 | sway_log(L_DEBUG, "Arranging output at %d", x); | 44 | sway_log(L_DEBUG, "Arranging output at %d", x); |
45 | child->x = x; | 45 | child->x = x; |
46 | child->y = y; | 46 | child->y = y; |
47 | arrange_windows(child, child->width, child->height); | 47 | arrange_windows(child, -1, -1); |
48 | x += child->width; | 48 | x += child->width; |
49 | } | 49 | } |
50 | return; | 50 | return; |
51 | case C_OUTPUT: | ||
52 | container->width = width; | ||
53 | container->height = height; | ||
54 | x -= container->x; | ||
55 | y -= container->y; | ||
56 | break; | ||
51 | case C_VIEW: | 57 | case C_VIEW: |
52 | { | 58 | { |
53 | struct wlc_geometry geometry = { | 59 | struct wlc_geometry geometry = { |
@@ -342,9 +348,8 @@ void add_output(wlc_handle output) { | |||
342 | add_child(container, workspace); | 348 | add_child(container, workspace); |
343 | sway_log(L_DEBUG, "Added workspace %s for output %d", workspace->name, output); | 349 | sway_log(L_DEBUG, "Added workspace %s for output %d", workspace->name, output); |
344 | 350 | ||
345 | workspace_switch(workspace); | ||
346 | |||
347 | if (root_container.focused == NULL) { | 351 | if (root_container.focused == NULL) { |
352 | workspace_switch(workspace); | ||
348 | unfocus_all(&root_container); | 353 | unfocus_all(&root_container); |
349 | focus_view(workspace); | 354 | focus_view(workspace); |
350 | } | 355 | } |