Skip to content

Limit browser dock hang workaround to impacted Qt versions#527

Open
WizardCM wants to merge 1 commit into
obsproject:masterfrom
WizardCM:restore-dock-focus-qt
Open

Limit browser dock hang workaround to impacted Qt versions#527
WizardCM wants to merge 1 commit into
obsproject:masterfrom
WizardCM:restore-dock-focus-qt

Conversation

@WizardCM

@WizardCM WizardCM commented Jun 4, 2026

Copy link
Copy Markdown
Member

Description

This restores prior behaviour of ignoring navigation events on startup to avoid the OBS window repeatedly stealing focus once for every browser dock being restored.

Motivation and Context

We've updated Qt. Qt have fixed the issue this code was meant to work around.

While working on #523 I was repeatedly impacted by this code not being run. I am thrilled to be able to re-enable it.

How Has This Been Tested?

Launched current OBS master with CEF 127 (our current shipping version) and ensured OBS doesn't hang and also doesn't repeatedly steal focus.

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • I have read the contributing document.
  • My code has been run through clang-format.
  • My code follows the project's style guidelines
  • My code is not on the master branch.
  • My code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@WizardCM WizardCM added the kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. label Jun 4, 2026
Comment thread panel/browser-panel-client.cpp Outdated
bool QCefBrowserClient::OnSetFocus(CefRefPtr<CefBrowser>, CefFocusHandler::FocusSource source)
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0) && QT_VERSION < QT_VERSION_CHECK(6, 8, 8)

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.

All versions of Qt 6.9 would also be affected. While this was cherry-picked to the Qt 6.10 branch, it does not appear that it is part of any Qt 6.10.x release:

The earliest released version of Qt with a non-commercial release is Qt 6.11.1: qt/qtbase@b11acf4

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah, how frustrating. Fixed.

@WizardCM WizardCM force-pushed the restore-dock-focus-qt branch from e05142e to 6114a00 Compare June 5, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants