Skip to content

macos: avoid synchronous generic icon lookup on focus (#725) - #727

Merged
zackees merged 3 commits into
masterfrom
fix/725-macos-icon-focus
Oct 14, 2026
Merged

zackees merged 3 commits into
masterfrom
fix/725-macos-icon-focus

Conversation

@zackees

@zackees zackees commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Changes

Fixes #725. Refs #635. This is a prerequisite for the complete release validation of #627 / #724.

Give the macOS application an explicit bundled icon before creating windows. For Qt 6.11 Cocoa, disconnect only the platform integration object's focus receiver, which synchronously asks Apple IconServices for a generic application icon before checking the explicit icon. Native menu and user focus receivers remain connected. The private Qt dependency and adapter are limited to macOS with Qt 6.11; other platforms retain the existing icon initialization.

Verify the explicit icon policy after persistent logging opens and fail clearly if initialization failed.

Reproduction and RED → GREEN

Release verification run 38556183769 failed on Intel macOS twice, on separate runners: jobs 115835640525 and 115840398922. Samples of each owned OBS process show the main thread in QCocoaIntegration::focusWindowChanged → NSWorkspace iconForContentType: → ISIconManager _init → synchronous XPC wait. Existing startup/shutdown deadlines remain unchanged.

  • RED cff61f97c: compile the actual OBSApp icon initialization block with observable focus receivers. macOS lacks an explicit icon and retains the generic Cocoa focus lookup, so the regression fails.
  • GREEN 7cba75592: explicit icon and targeted receiver removal; compiled tests preserve menu/user focus receivers and verify the policy after logging opens.
  • 82064635a: formatting and Qt signal signature normalization in the test model. Three focused tests pass.

The model tests establish policy and receiver selection; they do not establish native private Qt ABI compatibility or prove the hosted macOS hang is fixed.

Validation

  • ./lint: passed (57.7 seconds).
  • ./unittest: passed. Rust/cross checks passed (124.1 seconds); both unchanged C lanes reported 0 failures out of 208, with existing skips; exported symbol sets identical (1,766). Tier 2 took 223.4 seconds.
  • Local gate attestation: all four lanes passed (515 seconds); stamped head 6cef2253ba17, tree 2ec3f3a14aae.
  • clud-review: clean, one primary reviewer across all changed languages.
  • Routine PR CI 38568620148: success on exact stamped head, including CI Gate.
  • Native production package verification 38568634405: completed success on exact stamped head 6cef2253ba1730afb4d31ca8f1fc36c30bd1ed55. All five packages, full release gate, four AppImage distributions and both Windows startup jobs pass. Intel macOS job 115879319613 and Apple Silicon job 115879319864 each persist the explicit icon policy and pass fresh/default migration/custom migration/existing settings modes, including saved capture profile, protocol/rendering checks and clean shutdown within the unchanged deadlines. Upstream settings remain unchanged.

Risks

The Qt 6.11 adapter uses the private platform integration boundary. Native compilation and packaged startup must validate available private headers, RTTI and actual Cocoa behavior. It removes only that receiver's focus signal connection; it does not block application signals or disconnect menu receivers.

Local-Gate: v1 tree=2ec3f3a14aaee00b220ee2a110108bf0b88dd76c secs=515 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run
Ci-Attestation: {"at":1791982909,"gate":"rust/all/fmt","host":"linux-x86_64","key":"5bafe08eeb1901da37c67a94c6b040965fcfb8ed41804deb57e6639a75441c9e","lane":"lint","parents":["7cba75592393542078736e35119f9615c3234f0e"],"secs":99,"stamp":"8d206b0fbbf6823e808f8802e1685e32","tree":"2ec3f3a14aaee00b220ee2a110108bf0b88dd76c","v":1,"via":"run"}
Ci-Attestation: {"at":1791982909,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"5bafe08eeb1901da37c67a94c6b040965fcfb8ed41804deb57e6639a75441c9e","lane":"lint","parents":["7cba75592393542078736e35119f9615c3234f0e"],"secs":99,"stamp":"136c00949b92d81c19397d0530b29b3b","tree":"2ec3f3a14aaee00b220ee2a110108bf0b88dd76c","v":1,"via":"run"}
Ci-Attestation: {"at":1791982909,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"7e78591e58b3212e01aade3ab4c94dca9394c1e9fa5a650b1cededc26de6442c","lane":"rust-test","parents":["7cba75592393542078736e35119f9615c3234f0e"],"secs":136,"stamp":"dce2c1a6f2255c871dcdce8c358cba9e","tree":"2ec3f3a14aaee00b220ee2a110108bf0b88dd76c","v":1,"via":"run"}
Ci-Attestation: {"at":1791982909,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"cdac6641152acd3114c89103b24ceb6d497a3ff73d8baaee6fa012a196fa6c40","lane":"cross","parents":["7cba75592393542078736e35119f9615c3234f0e"],"secs":116,"stamp":"4a3c3efab971aaae68c1c85d059afaeb","tree":"2ec3f3a14aaee00b220ee2a110108bf0b88dd76c","v":1,"via":"run"}
Ci-Attestation: {"at":1791982909,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"cdac6641152acd3114c89103b24ceb6d497a3ff73d8baaee6fa012a196fa6c40","lane":"cross","parents":["7cba75592393542078736e35119f9615c3234f0e"],"secs":116,"stamp":"5d9c15354ee1c78aa02085b5819a7a4c","tree":"2ec3f3a14aaee00b220ee2a110108bf0b88dd76c","v":1,"via":"run"}
Ci-Attestation: {"at":1791982909,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"cdac6641152acd3114c89103b24ceb6d497a3ff73d8baaee6fa012a196fa6c40","lane":"cross","parents":["7cba75592393542078736e35119f9615c3234f0e"],"secs":116,"stamp":"41a4d0730de8ad79a50dd6fc1da78c6a","tree":"2ec3f3a14aaee00b220ee2a110108bf0b88dd76c","v":1,"via":"run"}
Ci-Attestation: {"at":1791982909,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"cdac6641152acd3114c89103b24ceb6d497a3ff73d8baaee6fa012a196fa6c40","lane":"cross","parents":["7cba75592393542078736e35119f9615c3234f0e"],"secs":116,"stamp":"c13fe637e984ebb8605ac5ce78c7f2ee","tree":"2ec3f3a14aaee00b220ee2a110108bf0b88dd76c","v":1,"via":"run"}
Ci-Attestation: {"at":1791982909,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"cdac6641152acd3114c89103b24ceb6d497a3ff73d8baaee6fa012a196fa6c40","lane":"cross","parents":["7cba75592393542078736e35119f9615c3234f0e"],"secs":116,"stamp":"bbdeade13e1d9375cb3723419b46e6dc","tree":"2ec3f3a14aaee00b220ee2a110108bf0b88dd76c","v":1,"via":"run"}
Ci-Attestation: {"at":1791982909,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"cdac6641152acd3114c89103b24ceb6d497a3ff73d8baaee6fa012a196fa6c40","lane":"cross","parents":["7cba75592393542078736e35119f9615c3234f0e"],"secs":116,"stamp":"5fe9f85f286c40105db55ccc10674195","tree":"2ec3f3a14aaee00b220ee2a110108bf0b88dd76c","v":1,"via":"run"}
Ci-Attestation: {"at":1791982909,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"04644b1e8088ca50d94aacd278550e26d19ffecf1cad2d08b426736cee800506","lane":"tier2-linux","parents":["7cba75592393542078736e35119f9615c3234f0e"],"secs":165,"stamp":"a668931a951e808f1bc64f0ca04f13b9","tree":"2ec3f3a14aaee00b220ee2a110108bf0b88dd76c","v":1,"via":"run"}
@zackees
zackees marked this pull request as ready for review October 14, 2026 13:31
@zackees
zackees added this pull request to the merge queue Oct 14, 2026
Merged via the queue into master with commit e2f6295 Oct 14, 2026
53 checks passed
@zackees
zackees deleted the fix/725-macos-icon-focus branch October 14, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug: macOS: Qt focus events hang in synchronous IconServices lookup

1 participant