Skip to content

WindowManager/ShellClients: Explicitly override window group#2826

Merged
lenemter merged 3 commits into
mainfrom
leolost/explicit-override-window-group
May 5, 2026
Merged

WindowManager/ShellClients: Explicitly override window group#2826
lenemter merged 3 commits into
mainfrom
leolost/explicit-override-window-group

Conversation

@leolost2605
Copy link
Copy Markdown
Member

@leolost2605 leolost2605 commented Apr 23, 2026

To select the correct group for shell windows the window manager currently has to know what the possibilities are and then query the shell clients manager to see if the windows are one of that.
It also only works if we know the correct info about the windows before their window actor is turning visible.

Instead of this hacky solution we introduce a override_window_group in the wm. This is then called by the shellclientsmanager at that moment when it knows what the window will be.

This has a few advantages:

  • We have a clear interface for how to handle changing the group of a window that also makes sure the wm knows about it and doesn't try to mess with it.
  • It scales a lot better by allowing the actual places that know that the window should be somewhere else to change its group instead of the wm having to query everywhere. This will be useful for example with the osk which will also need its own group.
  • It reduces the public api the shellclientsmanager has to expose
  • It should finally fix the wingpanel sometimes being invisible in the multitasking view which for me still happens even after Move windows to shell group when window type changes #2646
  • The second commit can remove some now unecessary code

@leolost2605 leolost2605 requested a review from a team April 23, 2026 14:05
Comment thread src/WindowManager.vala Outdated
Comment thread src/ShellClients/ShellClientsManager.vala Outdated
@leolost2605
Copy link
Copy Markdown
Member Author

leolost2605 commented May 2, 2026

@lenemter I've been thinking a bit more about it and maybe we should provide an enum of layers instead of allowing to provide any clutter.actor? What do you think about that? This would allow us to keep a bit more of an overview what layers exist and where goes what.

@leolost2605 leolost2605 force-pushed the leolost/explicit-override-window-group branch from 44fc4ae to 753c0cb Compare May 2, 2026 12:01
@lenemter
Copy link
Copy Markdown
Member

lenemter commented May 2, 2026

@leolost2605 I think it's a good idea to put different windows into different layers and an enum seems to be a good and intuitive solution, so that's a 👍 from me

@leolost2605 leolost2605 force-pushed the leolost/explicit-override-window-group branch 2 times, most recently from d8066d9 to c345743 Compare May 2, 2026 12:05
@leolost2605
Copy link
Copy Markdown
Member Author

@lenemter all right I updated it and addressed the review comments so should be ready again :)

@leolost2605 leolost2605 requested a review from lenemter May 2, 2026 12:08
Comment thread src/WindowManager.vala
@leolost2605 leolost2605 force-pushed the leolost/explicit-override-window-group branch from c345743 to 2a380dc Compare May 2, 2026 20:42
@leolost2605 leolost2605 requested a review from lenemter May 2, 2026 20:45
@lenemter
Copy link
Copy Markdown
Member

lenemter commented May 3, 2026

It should finally fix the wingpanel sometimes being invisible in the multitasking view which for me still happens even after #2646

I still can reliable reproduce this issue, but I guess it's unrelated to this codepath

@lenemter lenemter force-pushed the leolost/explicit-override-window-group branch from 2956ab9 to 1761652 Compare May 5, 2026 11:01
@lenemter lenemter enabled auto-merge (rebase) May 5, 2026 11:02
@lenemter lenemter merged commit ea26f73 into main May 5, 2026
6 checks passed
@lenemter lenemter deleted the leolost/explicit-override-window-group branch May 5, 2026 11:04
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.

2 participants