Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

groupbar fixes #2630

Merged
merged 9 commits into from
Jul 3, 2023
Merged

groupbar fixes #2630

merged 9 commits into from
Jul 3, 2023

Conversation

MightyPlaza
Copy link
Contributor

@MightyPlaza MightyPlaza commented Jul 3, 2023

Fixes multiple groupbar decoration issues:

  • togglegroup removes fullscreen to avoid to avoid weird state
  • fixes issue where a group had multiple windows with head = true
  • fixes issue where merging 2 groups would cause a window to have 2 groupbar decorations
  • fixes issue where merging a group with more than 1 window into another group would make windows have no groupbar decoration
  • fixes issue where ungrouping windows could just move them into another group on the same workspace

probably more but I don't remember

Dwindle Layout as been tested and seems stable and working as intended.
Master Layout seem to work as well, but has been less tested and I'm less familiar with how it works.

Known issues:

  • Still haven't found the cause of the focused window groupbar not getting correctly updated when there are multiple groups open side by side (text gets streched) (was already on main branch). Probably related to multiple groupbar damage issues open here.

  • There is also an unusual animation the first time opening a window that was in a group after merging it with another group (only on Master Layout). Still haven't found the cause. (was already on main branch as well)

Probably ready to merge, but a bit of testing would be good

Closes:

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also format with clang-format pls

src/Window.cpp Outdated Show resolved Hide resolved
src/layout/MasterLayout.cpp Outdated Show resolved Hide resolved
src/layout/DwindleLayout.cpp Outdated Show resolved Hide resolved
src/layout/DwindleLayout.cpp Outdated Show resolved Hide resolved
src/layout/MasterLayout.cpp Outdated Show resolved Hide resolved
@vaxerski
Copy link
Member

vaxerski commented Jul 3, 2023

ready to merge to me, the stretching issue is to be fixed separately, I can already see why it happens

@vaxerski vaxerski merged commit 05047f6 into hyprwm:main Jul 3, 2023
8 checks passed
@MightyPlaza MightyPlaza deleted the Groupbar-Fixes branch July 3, 2023 11:25
@MightyPlaza
Copy link
Contributor Author

PHEAD has already defined in that function as the HEAD of the target group, SHEAD was the the head of the source group.
Altough it doesn't cause a conflict for now, might cause confusion in the future.

ItsDrike added a commit to ItsDrike/hyprland-dwindle-autogroup that referenced this pull request Jul 22, 2023
Hyprland has updated some of the core functions related to groupping
windows in PR: hyprwm/Hyprland#2630

Specifically, the CWindow::insertWindowIntoGroup was updated to no
longer automatically make the newly inserted window the group's head,
allowing to insert windows without the group auto-focusing them.

With that, the CKeybindManager::moveIntoGroup (dispatcher) function was
then updated to adhere to the change in insertWindowIntoGroup and to
make the inserted widow the group's head from there.

It's probably possible to utilize the insertWindowIntoGroup without
making the inserted window the group's head in a more clever way,
however for now, this commit just changes our logic in groupCreate
function to fully replicate the moveIntoGroup for each dwindle child
node window.

This means we're still doing what we were doing before, that is to
insert a window, make it the group head, repeat for each dwindle child
and at the end make the original group head the head again.

The reason this fix doesn't simply skip making each of the nodes a group
head is that without it, the layout doesn't seem to properly recognize
that the window should no longer be shown, and while this probably can
be addressed by replicating some of the CWindow::setGroupCurrent
function's behavior, for now, that's a task for later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants