Skip to content

Click a player to switch cameras#40

Merged
danielchalmers merged 2 commits into
mainfrom
claude/click-to-switch
Jun 18, 2026
Merged

Click a player to switch cameras#40
danielchalmers merged 2 commits into
mainfrom
claude/click-to-switch

Conversation

@danielchalmers

Copy link
Copy Markdown
Owner

What

You couldn't click a mini camera preview to switch to it — the click landed on Flyleaf's native video surface, which WPF never sees (and the earlier WPF-overlay attempt was on the wrong layer, so it never fired).

The fix hooks the click on Flyleaf's own surface window: FlyleafHost.Surface is a public Window, created when the host loads and reused across reparenting. MainWindow.HookCameraClick subscribes to each surface's MouseLeftButtonDown (with handledEventsToo so Flyleaf marking it handled doesn't hide it) and runs SelectCameraViewCommand for that camera. A HashSet guards against re-subscribing when Loaded fires again on a reparent.

Clicking any player — a mini preview or the big one — now switches that camera to the main view. (No layout change; the dedicated bottom bar stays.)

Verification

Build clean, 93 tests pass, smoke-launch clean. The click behavior needs your eyes (can't be exercised headlessly).

Note

This is the click-to-switch piece only. The reparent flash and the inability to draw WPF over the video are inherent to Flyleaf-on-WPF (no compositing / D3DImage support, per the maintainer) and remain accepted.

@danielchalmers danielchalmers merged commit 0072fe8 into main Jun 18, 2026
1 check passed
@danielchalmers danielchalmers deleted the claude/click-to-switch branch June 18, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant