mirror of
https://github.com/swaywm/sway.git
synced 2026-05-03 06:46:26 -04:00
Refactor logic to determine if stacked/tabbed con
Add a new function `swayc_is_tabbed_or_stacked()` to determine whether or not the given container has layout of stacked or tabbed. This is done commonly enough that it should have its own method to help readability and code quality. No logic changes.
This commit is contained in:
parent
a4096b73c9
commit
02638c1f44
7 changed files with 22 additions and 10 deletions
|
|
@ -793,8 +793,7 @@ static void arrange_windows_r(swayc_t *container, double width, double height) {
|
|||
y = container->y;
|
||||
|
||||
// add gaps to top level tapped/stacked container
|
||||
if (container->parent->type == C_WORKSPACE &&
|
||||
(container->layout == L_TABBED || container->layout == L_STACKED)) {
|
||||
if (container->parent->type == C_WORKSPACE && swayc_is_tabbed_or_stacked(container)) {
|
||||
update_geometry(container);
|
||||
width = container->border_geometry.size.w;
|
||||
height = container->border_geometry.size.h;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue