qt: fix crash with Wayland on close if the surface is invalidated by Qt
If we allow Qt to close the interface window, the underlying "window" (surface in Wayland case) may be gone when it is still necessary by the application.
With Wayland, idle inhibitor needs the surface to initialize, so the surface must outlive the inhibitor. However, without the change proposed here, the inhibitor (zwp_idle_inhibitor_v1
) may be destroyed after Qt is closed.
- Start the interface.
- Play a video.
- Stop the player.
- Close the interface.
- ** Crash **
This change should be fine, as we destroy the window ourselves anyway (at correct time) and destroying the window obviously closes it.
Merge request reports
Activity
Request review @chub.
added MRStatus::Reviewable label
changed milestone to %4.0
added Component::Interface: Qt label
requested review from @chub
added MRStatus::WaitingForReviewerFeedback label and removed MRStatus::Reviewable label
- Resolved by Pierre Lamot
added MRStatus::InReview label and removed MRStatus::WaitingForReviewerFeedback label
- Resolved by Pierre Lamot
Now that the window closes only during destruction, does it make sense to close the window and wait for it instead of "closing" it via destruction in
unloadGUI()
? I'm not sure if window manager/compositor expects every window to be closed safely before destruction, I'm also not sure if Qt does that already itself.Edited by Fatih Uzunoğlu
added 1 commit
- 761eed3f - qt: do not let qt to close the interface window itself
added MRStatus::Acceptable label and removed MRStatus::InReview label
added MRStatus::Accepted label and removed MRStatus::Acceptable label
MR Acceptance result
This MergeRequest has been Accepted! Congratulations.MR acceptance checks details:
-
MR should be considered mergeable by Gitlab -
Last pipeline should be successful -
MergeRequest should have at least one external review and/or vote -
All threads should be resolved, have votes and score > 0 -
MergeRequest should have no activity (threads/votes) for (72h/72h)
-
added 532 commits
-
761eed3f...b01a8797 - 531 commits from branch
videolan:master
- b83603de - qt: do not let qt to close the interface window itself
-
761eed3f...b01a8797 - 531 commits from branch
enabled an automatic merge when all merge checks for b83603de pass