Repository navigation
Conversation
Destroy the UI group when the display starts closing to ensure Gala's UI components are torn down before Mutter destroys the display and compositor. This prevents a crash when a modal dialog is closed during logout.
leolost2605
left a comment
There was a problem hiding this comment.
Unfortunately just doing it like this will cause a critical because we put the window group etc. into the ui group so this would destroy them too and then the compositor doesn't have anything left to destroy.
To fix this we would have to reparent our "adopted" actors back to the stage. I also finally found how gnome shell handles this and it's exactly what they do (only they have an extra shutdown signal but display.closing is good enough for us) (also note that we don't use the input_panel_group so we can ignore it):
https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/layout.js#L225
And two other little things:
- we avoid using lambdas because they can easily cause memory leaks
- I would put this into the LayoutManager.vala and not the WindowManager since that's the place that originally creates the ui group and reparents the other actors etc.
|
@leolost2605 Could you implement this? I'm not very familiar with the proper way to handle this. |
|
@City-busz done in #2981 :) |
Destroy the UI group when the display starts closing to ensure Gala's UI components are torn down before Mutter destroys the display and compositor.
This prevents a crash when a modal dialog is closed during logout.