Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Destroy UI group when display is closing - #2980

Open
City-busz wants to merge 1 commit into
elementary:mainfrom
City-busz:fix-logout-crash2
Open

City-busz wants to merge 1 commit into
elementary:mainfrom
City-busz:fix-logout-crash2

Conversation

@City-busz

Copy link
Copy Markdown
Contributor

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.

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 leolost2605 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@City-busz

Copy link
Copy Markdown
Contributor Author

@leolost2605 Could you implement this? I'm not very familiar with the proper way to handle this.

@leolost2605

Copy link
Copy Markdown
Member

@City-busz done in #2981 :)

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