Skip to content

feat: add Picture-in-Picture mode via system tray toggle#34

Open
kaydorbz wants to merge 1 commit intoStremio:mainfrom
kaydorbz:feature/picture-in-picture
Open

feat: add Picture-in-Picture mode via system tray toggle#34
kaydorbz wants to merge 1 commit intoStremio:mainfrom
kaydorbz:feature/picture-in-picture

Conversation

@kaydorbz
Copy link
Copy Markdown

Picture-in-Picture Mode

Adds PiP support to the desktop shell via the system tray menu.

What it does

  • Toggles the main window to a small (400×225), always-on-top, non-resizable, draggable window
  • Restores to full window on second toggle
  • Checkmark in tray menu shows current PiP state
  • Bypasses minimum window size constraints only when in PiP mode

Implementation

  • window_helper.rs: New toggle_pip() method on WindowStyle — saves/restores window state, applies PiP style (no thick frame, always-on-top, 400×225)
  • app.rs: on_toggle_pip_notice handler, Cell<bool> for pip_mode to avoid RefCell borrow conflicts during WM_GETMINMAXINFO
  • systray.rs: "Picture in Picture" menu item with checkmark

Closes

Testing

  • Tested on Windows with stremio-shell-ng.exe + MPV playback
  • PiP enters/exits cleanly, video continues playing, always-on-top persists across focus changes

- Add toggle_pip to WindowStyle (always-on-top, 400x225, no resize, draggable)
- Add PiP menu item to system tray with checkmark state
- Add Cell<bool> pip_mode to bypass min_max constraints during PiP
- Restore full window on PiP exit
- Closes Stremio/stremio-shell#460
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