Zren / mpv-osc-tethys

An OSC UI replacement for MPV with icons from the bomi video player. Also contains thumbnail preview and a picture-in-picture button.
187 stars 13 forks source link

Issues in PiP mode #7

Closed TheDcoder closed 2 years ago

TheDcoder commented 2 years ago

I noticed 2 issues in the "Picture-in-Picture" mode:

  1. The window doesn't stay above other windows
  2. The window is not resizable with the mouse, I can only resize it by snapping it into quadrants of my screen.

I'm using the Xfwm (Xfce) window manager and I'm comparing my experience to Firefox's PiP feature which doesn't have those issues.

Regardless, it's a cool feature, thanks for implementing it :smile:

Zren commented 2 years ago

(1) No idea why it doesn't work in Xfwm, I've only tested KWin. Does mpv --ontop work?

https://mpv.io/manual/master/#options-ontop

(2) Use Alt+RightClick+Drag to resize a window in XOrg+Linux. In KDE it's Win+RightClick+Drag.

XOrg doesn't really have a "no-border" window flag that doesn't also prevent resizing the window. The feature was mainly intended for "splash screens".

I doubt it'd be possible to trigger a "native" window resize when hovering the edges of the window. Firefox can do that, but I probably wouldn't be able to do so in a "lua plugin" which can't access the window/xorg code.

Zren commented 2 years ago

(2) Also, you can change the default pipGeometry=33%+-10+-10 if you consistently need a different size.

pipGeometry=33%+-10+-10 # PictureInPicture 33% screen width, 10px from bottom right

https://github.com/Zren/mpv-osc-tethys#tethysconf

TheDcoder commented 2 years ago

Thank you for the detailed response.

(1) No idea why it doesn't work in Xfwm, I've only tested KWin. Does mpv --ontop work?

It does, and I tested PiP mode again just in case and now it seems to be working fine as well... very strange. It didn't work at all for some reason when I tested it before posting this issue.

(2) Use Alt+RightClick+Drag to resize a window in XOrg+Linux. In KDE it's Win+RightClick+Drag.

Awesome! I didn't know about that trick, and this essentially eliminates the need for window borders.

As the issues are no longer an issue (LOL), I'm going to close this! :)