summaryrefslogtreecommitdiffstats
path: root/sway/layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/layout.c')
-rw-r--r--sway/layout.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/sway/layout.c b/sway/layout.c
index de186886..70980ec3 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -1,6 +1,7 @@
1#include <stdlib.h> 1#include <stdlib.h>
2#include <stdbool.h> 2#include <stdbool.h>
3#include <wlc/wlc.h> 3#include <wlc/wlc.h>
4#include "extensions.h"
4#include "layout.h" 5#include "layout.h"
5#include "log.h" 6#include "log.h"
6#include "list.h" 7#include "list.h"
@@ -426,6 +427,27 @@ static void arrange_windows_r(swayc_t *container, double width, double height) {
426 } 427 }
427 return; 428 return;
428 case C_OUTPUT: 429 case C_OUTPUT:
430 for (i = 0; i < desktop_shell.panels->length; ++i) {
431 struct panel_config *config = desktop_shell.panels->items[i];
432 if (config->output == container->handle) {
433 struct wlc_size size = *wlc_surface_get_size(config->surface);
434 switch (desktop_shell.panel_position) {
435 case DESKTOP_SHELL_PANEL_POSITION_TOP:
436 y += size.h; height -= size.h;
437 break;
438 case DESKTOP_SHELL_PANEL_POSITION_BOTTOM:
439 height -= size.h;
440 break;
441 case DESKTOP_SHELL_PANEL_POSITION_LEFT:
442 x += size.w; width -= size.w;
443 break;
444 case DESKTOP_SHELL_PANEL_POSITION_RIGHT:
445 width -= size.w;
446 break;
447 }
448 }
449 }
450
429 container->width = width; 451 container->width = width;
430 container->height = height; 452 container->height = height;
431 x = 0, y = 0; 453 x = 0, y = 0;