nurupo / vlc-pause-click-plugin

Plugin for VLC that pauses/plays video on mouse click
GNU Lesser General Public License v2.1
945 stars 64 forks source link

Move window when holding video #99

Closed mopoIo closed 1 year ago

mopoIo commented 1 year ago

There are some settings we can change to emulate a (PIP), but we still have to move from the window bar, it would be neat to have an option to just drag the image to move the floating player

nurupo commented 1 year ago

vlc_vout_window.h in VLC 3 and vlc_window.h in VLC 4 define window operations and I can't find any window move API (setting window's x and y), so doesn't look like this is possible.

(Well, VLC does provide access to the platform window handle, so it is technically possible to do this e.g. via calls to Windows API, but I prefer to keep the plugin cross-platform, so having such platform specific code is something I'd like to avoid, not to mention that the plugin already suffers from supporting excessive number of extra features. If VLC provided a window move API, I would have considered adding support for this, but since it doesn't then it's a nonstarter.)

Your best bet is to open an issue in VLC's repo, asking for the ability to move the video window around by grabbing and moving the video image to be added to VLC. No need to mention anything about this plugin or the VLC API no supporting window move. This feature would likely end up being implemented in the Qt GUI plugin, and it should be easy enough to implement, as it's just a call to QWidget::setGeometry whenever the move is moving while clicked and the feature is enabled. However, it doesn't sound like a high priority feature and it will conflict with things like the puzzle video filter plugin, where the video gets broken in jigsaw puzzle pieces and you must move them around to construct the image - so I can see how some VLC developers could disagree on whether this feature should be added to VLC. Still worth a try though, if you want it to be added.