view: consolidate group flags and apply window rules#13694
Conversation
Replace individual boolean flags with a bitmask for group policies and ensure that window-specific group rules are correctly inherited when windows are initialized or added to a group.
|
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. |
|
can you please write some tests for this? :) |
I will try later, but I can't promise anything, hyprtester isn't working right for me :/ will try running it under a VM, maybe it'll stop crashing like crazy. |
Add tests to verify window grouping behavior, specifically checking that locked groups prevent merging by default and that the 'invade' group rule correctly overrides this lock policy.
Hello again, sorry it took so long, I've added 3 tests:
Testing locally I got: The clang CI seemingly fails due to the main upstream changes 🙏🏻 |
* view: consolidate group flags and apply window rules Replace individual boolean flags with a bitmask for group policies and ensure that window-specific group rules are correctly inherited when windows are initialized or added to a group. * tests: add cases for locked groups and invade rule Add tests to verify window grouping behavior, specifically checking that locked groups prevent merging by default and that the 'invade' group rule correctly overrides this lock policy.
* view: consolidate group flags and apply window rules Replace individual boolean flags with a bitmask for group policies and ensure that window-specific group rules are correctly inherited when windows are initialized or added to a group. * tests: add cases for locked groups and invade rule Add tests to verify window grouping behavior, specifically checking that locked groups prevent merging by default and that the 'invade' group rule correctly overrides this lock policy.
Hi,
noticed a regression since the Groups refactor (#13460), after some poking I think I've finally found the solution, albeit I'm not sure if I'm doing it properly, sorry, I'm new to this codebase!
I've built it and tested it locally and it seemingly works, the group rules are being applied again.
As now the code's using bitmasks and a flags holder, the m_locked and m_deny became redundant (I've tried setting them with the bitmasks, but that wouldn't work for some reason..?).
Wasn't able to test it properly with hyprtester unfortunately, had some luck running it using Xephyr, but it'd fail on tests that'd assume I have kitty terminal emulator installed etc., not sure how to run it properly, wouldn't work from a fresh TTY either.. but ctest passed.