diff options
author | S. Christoffer Eliesen <[email protected]> | 2015-12-20 12:49:11 +0100 |
---|---|---|
committer | S. Christoffer Eliesen <[email protected]> | 2015-12-20 12:54:34 +0100 |
commit | e45fd9b6c5dfb858c6f86277351bc216574d8200 (patch) | |
tree | 8d70e85b1e1f1dcca401429c95b9b8ee9bde8890 /sway/layout.c | |
parent | 6db0f6f80f75f7e141e3a8b0c19fa317354bf5cc (diff) |
extensions: Track panels by wl_resource, position per panel.
Track each panel separately via its wl_resource. `set_panel_position`
might be called before `set_panel`, so reuse panel config.
Place the position in panel_config so that each panel has its own
position.
Diffstat (limited to 'sway/layout.c')
-rw-r--r-- | sway/layout.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/layout.c b/sway/layout.c index 5b7dc486..6d82921c 100644 --- a/sway/layout.c +++ b/sway/layout.c @@ -455,8 +455,8 @@ static void arrange_windows_r(swayc_t *container, double width, double height) { struct panel_config *config = desktop_shell.panels->items[i]; if (config->output == output->handle) { struct wlc_size size = *wlc_surface_get_size(config->surface); - sway_log(L_DEBUG, "-> Found panel for this workspace: %ux%u, position: %u", size.w, size.h, desktop_shell.panel_position); - switch (desktop_shell.panel_position) { + sway_log(L_DEBUG, "-> Found panel for this workspace: %ux%u, position: %u", size.w, size.h, config->panel_position); + switch (config->panel_position) { case DESKTOP_SHELL_PANEL_POSITION_TOP: y += size.h; height -= size.h; break; |