groups: add groupbar disable_when_only option#15009
Conversation
|
Hello and thank you for making a PR to Hyprland! Please check the PR Guidelines and make sure your PR follows them. If your code can be tested, please always add tests. See more here. beep boop, I'm just a bot. A real human will review your PR soon. |
154710f to
0751abd
Compare
|
your test fails :( |
0751abd to
6fcacc0
Compare
|
@vaxerski
So, at first sight we just need to add My question:
if (VISIBLE != m_bLastVisibilityStatus)
g_pDecorationPositioner->repositionDeco(this);from
|
|
doh, you mean live. Yes, uncaching when window state changes is ok. |
d0ea2a0 to
2210e1c
Compare
|
clang-format please |
`groups_disable_when_only` test fails because it checks windows sizes after `disable_when_only` option changed. Changing option currently don't trigger window size update. Same problem with `groups` test, but it worked because it or: - didn't checked window size after changing option. - called `hl.dsp.group.toggle()`, which trigger size update - at the begining set `enable = 1` while it `== 1` by default Now it fails too :D Seems it works in usual Hyprland usage because: - `CHyprGroupBarDecoration::draw` calls - `g_pDecorationPositioner->repositionDeco(this)`, which will invalidate cache and update sizes.
REFRESH_LAYOUTS is not required 'cause REFRESH_WINDOW_STATES will trigger update of window position too.
2210e1c to
b8884db
Compare
|
@vaxerski, I fixed formatting. Any other suggestions? Or we can merge. |
group:groupbar:disable_when_only
Option allow to hide groupbar if it contains only single window.
This is especially useful with rule:
Possible issues
group:groupbar:enable, but inrefreshGroupBarGradientsthere is no availible active group to properly check optiondisable_when_onlyI think this check unnecessary here because same scenario already exist when there is no windows with groupbar, but option
enabled == true. But unsure - require review.Is it ready for merging, or does it need work?
First of all it is need an approve - do we need such feature at all. Then - I tried my best to do this PR as possible as ready for merge. But I'm open for critique and suggestions.
wiki PR - hyprwm/hyprland-wiki#1551