Fix native streamer fullscreen monitor placement#505
Conversation
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f4501721df
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| render_rect_to_screen_rect(window_handle as Hwnd, rect) | ||
| .or_else(|| monitor_rect_for_window(window_handle as Hwnd)) |
There was a problem hiding this comment.
Recompute the target rect instead of caching screen coordinates
When the Electron BrowserWindow is dragged to another monitor without being resized, the renderer only publishes surface updates for resize/fullscreen/visibility/visualViewport changes (StreamView.tsx), so no new update is sent on a pure window move. This converts the HWND-relative client rect into screen coordinates once and caches only that Rect; the guard then keeps using stale screen coordinates for SetWindowPos and ClipCursor, leaving the external renderer on the old monitor until some later resize/fullscreen event forces another surface update. Store the HWND plus client rect and recompute the screen rect in the guard loop, or have the main process publish move events.
Useful? React with 👍 / 👎.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Summary
Fixes #497
Verification