mirror of
https://github.com/swaywm/sway.git
synced 2025-11-11 13:29:51 -05:00
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.
This commit is contained in:
parent
6db0f6f80f
commit
e45fd9b6c5
4 changed files with 26 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue