Skip to content

facade: move widget window and display policies into native platform files - #1635

Merged
zackees merged 2 commits into
masterfrom
infra/875-widget-platform
Oct 21, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/875-widget-platform

Conversation

@zackees

@zackees zackees commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Fixes #875.

Change

Move preview text outline/font selection, widget icons, projector setup, graphics-window mapping, hidden-display policy and display native-event handling behind the existing frontend platform facade. Reuse the prior text font/source helpers. Remove native SDK/Wayland selection from the shared display PCH.

Preserve borrowed graphics handles, X11/Wayland field selection, unknown/zero-handle outcomes, display ownership on hide/show, and false native-event returns without changing the result value. Moving the Mac view assignment into the ARC group uses an explicit non-owning bridge; no retain/release calls are introduced. Public C headers remain unchanged. No user-visible behavior change is intended.

RED → GREEN

  • RED f14020417: actual original policy and OBSPtr ownership behavior passes in seven host/feature models; six boundary/wiring failures.
  • GREEN a408ea910: 102 focused tests pass, with two real Qt checks deferred locally to CI. Ratchet drops 13 findings. Pinned formatting, shell syntax and whitespace pass.
  • Fixtures execute the actual shared mapping wrapper, native-event method and visibility callback with the real OBSPtr template, covering destroy/create/resize counts, native MSG filtering, inactive fields and lookup counts, font/outline settings and BSD projector policy.
  • Clang compiles the actual Mac mapping helper as Objective-C++ with ARC, then LLVM output is checked for absence of retain/release/storeStrong calls.

Live backend and native validation

The existing Qt lane now installs Weston and runs live X11/Wayland QWindow handle smoke using the pinned prebuilt Qt (same Qt as the AppImage dependency recipe). X11 validates the mapped XID against XGetWindowAttributes; Wayland validates the mapped object is a wl_surface. Both exercise real visibleChanged(false) delivery and destruction through the actual OBSPtr template. Weston startup uses an event notification; only the test's own process group is stopped.

This is a standalone Qt/backend smoke, not a rebuilt packaged AppImage or an OpenGL-rendering test. Packaging is unchanged. Existing full CI is dispatched for the exact GREEN head because PCHs changed; required Windows/macOS app builds and live backend results passed. This is C++ extraction, not a Rust implementation swap or protocol change; Rust port-specific tiers and protocol Tier 4 do not apply.

Live Qt results

Qt job 119399484090 passed on GREEN. It reports widget-backend=xcb exposed=yes valid-native-handle=yes hidden-display-destroyed=1 and the same result for widget-backend=wayland. All five facade checks and all 19 existing Qt tests passed. Native app validation passed.

Required native/PR evidence

PR CI 39651104844 passed. Full-run Windows x64 job 119399484232 compiles the display and native platform groups and produces obs64.exe. macOS ARM64 job 119399484147 compiles the display group and ARC platform group and completes the app build; macOS x86_64 also passed. Linux job 119399484280 compiles display/x11 groups and links the complete GUI. The required full Windows/macOS build policy is satisfied; complete full workflow 39651098215 passed, including all app architectures, compatibility suites and Flatpak.

Merge-result CI 39653056106 passed; this PR merged and #875 closed.

@zackees
zackees marked this pull request as ready for review October 21, 2026 18:28
@zackees
zackees added this pull request to the merge queue Oct 21, 2026
Merged via the queue into master with commit 8100ce0 Oct 21, 2026
50 checks passed
@vpacher vpacher mentioned this pull request Oct 21, 2026
5 tasks done
@zackees
zackees deleted the infra/875-widget-platform branch October 26, 2026 15:45
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.

facade: frontend/widgets: OBSBasicPreview, OBSBasicStats, OBSProjector, OBSQTDisplay: move 14 platform conditionals behind frontend/utility/platform.hpp

1 participant