Move window by grabbing in any place of it with mouse.
One thing that I really miss from the MacOSX default video player is to be able to move the video window by grabbing it from any place of it.
I guess this could be implemented as OSX specific feature. The win32 backend already does this.
Looks hard on X11, because X11 is terrible.
Not sure I follow, on OS X I can already move the window by grabbing it from any place
I guess this could be implemented as OSX specific feature. The win32 backend already does this.
Looks hard on X11, because X11 is terrible.
I'm not sure this is an issue on X11 either way since most window managers should already allow you to move a window around like that (usually with some special key).
Yep, I think alt + mouse is popular for that.
The main problem with implementing window dragging in the application on X11 is that you need to account for weird details in reparenting window managers: usually you'll get an offset between the top corner of the containing WM window and the top corner of your own window. There is a very horrible extra protocol to deal with this, and that's when I stopped looking into it.
Anyway, on OS X mpv does this, unless you try to grab it at the (showing) OSC.
Can this be closed? The default behaviour on OS X is already like this.
Well, I was thinking about Linux while reporting this because I missed QuickTime player behavior in OSX when I used it (long time ago). I thought that with this feature, mpv whould be near perfect in usability. :D
2014-03-18 12:49 GMT-03:00 Stefano Pigozzi [email protected]:
Can this be closed? The default behaviour on OS X is already like this.
Reply to this email directly or view it on GitHubhttps://github.com/mpv-player/mpv/issues/608#issuecomment-37949146 .
Ok, thanks. Leaving this open. This was wrongly marked as a OS X specific issue (removing the tag). Not sure though if this is simple enough with the X11 APIs.
Thanks Steano!
2014-03-18 12:58 GMT-03:00 Stefano Pigozzi [email protected]:
Ok, thanks. Leaving this open. This was wrongly marked as a OS X specific issue. Not sure though if this is simple enough with the X11 APIs.
Reply to this email directly or view it on GitHubhttps://github.com/mpv-player/mpv/issues/608#issuecomment-37950310 .
Well, I was thinking about Linux
The X11 mechanisms for this are horrible. There is no real way to do this, just protocols provided by some window managers, and it's a quite overcomplicated protocols. Maybe I can try to look at it...
Just been curious: doesn't Wayland will help with those kind of things?
2014-03-18 13:10 GMT-03:00 wm4 [email protected]:
Well, I was thinking about Linux
The X11 mechanisms for this are horrible. There is no real way to do this, just protocols provided by some window managers, and it's a quite overcomplicated protocols. Maybe I can try to look at it...
Reply to this email directly or view it on GitHubhttps://github.com/mpv-player/mpv/issues/608#issuecomment-37951868 .
Do X11 users want this feature, or do OS X users want X11 users to have this feature? I don't follow
Was actually relatively simple. Most of the horrible code I've seen in GTK was either GTK source code being verbose, or fallbacks if the netwm mechanism is missing.
Thanks!
2014-03-18 16:45 GMT-03:00 wm4 [email protected]:
Was actually relatively simple. Most of the horrible code I've seen in GTK was either GTK source code being verbose, or fallbacks if the netwm mechanism is missing.
Reply to this email directly or view it on GitHubhttps://github.com/mpv-player/mpv/issues/608#issuecomment-37978824 .
Is there a way to disable this feature on Linux? It has been extremely annoying for me lately since it makes it very easy to move the window if you click it by accident while moving the mouse.
Forgot about this...
Is there a way to disable this feature on Linux?
Currently not. You could patch it out. Is it so important that it would warrant a config option?
It could be patched by users at build time but there could be changes to that section of the code in the future that could make a patch stop applying without changes and most people aren't able to make those changes themselves. I know enough to apply patches and build mpv but I don't have the ability to code in any language used in mpv except Lua so this would not be something I could do if the patch stopped working for me.
I would make it a config option since it is decidedly non-standard for a program on Linux to make it self-move on mouse click alone except when clicking window decorations. This would also leave it configurable for those who use a version of mpv distributed by their distro if they are unable to build it themselves.
I would make it a config option since it is decidedly non-standard for a program on Linux to make it self-move on mouse click alone except when clicking window decorations. There is no standard way to do UI stuff on X11 platforms, period. That said, on all my systems clicking anywhere to drag windows works, and KDE isn’t exactly an unpopular environment. You’re also the first to complain about this, which leads me to believe that trying to avoid clicking a mouse while moving it really isn’t that hard. No offense, but I’d be reluctant to add an option to compensate for a user’s inability to use a pointing device properly :P
There is no standard way to do UI stuff on X11 platforms, period. That said, on all my systems clicking anywhere to drag windows works, and KDE isn’t exactly an unpopular environment.
It is not standard for an individual program to do this just for itself. KDE is a window manager, this is the kind of behavior that is expected from a window manager. I also believe that option is configurable in KDE, so someone must have not liked it or foreseen that someone was likely not to like it.
You’re also the first to complain about this, which leads me to believe that trying to avoid clicking a mouse while moving it really isn’t that hard. No offense, but I’d be reluctant to add an option to compensate for a user’s inability to use a pointing device properly :P
Insults are not needed or constructive to the conversation. Kindly keep them to yourself in the future.
It is not standard for an individual program to do this just for itself. KDE is a window manager, this is the kind of behavior that is expected from a window manager.
True, but we also use the window manager protocol that was made specifically for allowing programs to make themselves draggable (_NET_WM_MOVERESIZE).
If there are other users who complain, I might add an option to configure this. But for now, here's a small lua script (drop into ~/.mpv/lua/) that should block window dragging:
function init()
mp.set_key_bindings({}, "nodrag")
mp.enable_key_bindings("nodrag", "allow-hide-cursor")
mp.set_mouse_area(0, 0, 9999, 9999, "nodrag")
end
mp.register_event("video-reconfig", init)
(It uses undocumented API that's considered internal - it'll probably break at some point - then ask again.)