UI,docs: Send a custom event to the dock widget when closing#10516
Merged
WizardCM merged 1 commit intoobsproject:masterfrom Aug 4, 2024
Merged
UI,docs: Send a custom event to the dock widget when closing#10516WizardCM merged 1 commit intoobsproject:masterfrom
WizardCM merged 1 commit intoobsproject:masterfrom
Conversation
WizardCM
approved these changes
Apr 13, 2024
RytoEX
requested changes
Apr 14, 2024
9264dde to
c106167
Compare
c106167 to
ece2e71
Compare
ece2e71 to
f5242c0
Compare
f5242c0 to
828735f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Send a custom event to the OBSDock widget when the dock (from
obs_frontend_add_dock_by_id) is closed, which allow plugin authors to potentially save resources while the dock is closed.A QShowEvent is already sent to the widget when the dock is (re-)opened.
Motivation and Context
Motivation related to:
Enabling a way closing browser from a plugin dock when the said dock is closed, since OBS Studio completely owns the access to the dock object.
So in a scenario like separating service integration, beside randomly guessing we can't know when close browsers to save resources.
How Has This Been Tested?
Disabled the
closeBrowser()call in BrowserDockcloseEvent()impl and added the following to QCefWidgetInternal for testing purpose:The browser is closed when the dock is closed thanks to the event as expected.
Types of changes
Checklist: