mpv icon indicating copy to clipboard operation
mpv copied to clipboard

"Inherit event flags from parent X11 window" commit breaks user input with mozplugger

Open alexwh opened this issue 12 years ago • 15 comments

https://github.com/mpv-player/mpv/commit/64b7811c28c3caadf42c394d54cfce222ad5503d seems to have broken mozplugger embedding in that mousing over the video will not display the OSC, and it will be uninteractable with the keyboard (but the video plays fine). mpv is called with --autofit and -wid. Verbose log: https://gist.github.com/alexwh/2c143efe8ef3164f2786 Is this a problem with the change, or is it mozplugger's bug by not being able to provide event flags or something?

For reference, I'm using the ViewTube userscript and the mozplugger config was the one used on the Arch wiki

alexwh avatar Sep 12 '14 18:09 alexwh

Just in case you don’t know, you can use swallow instead of --wid.

Here’s what I use:

define(MP_CMD,[mpv --cache-file="/path/to/cache_folder/$(echo $hexwindow | sed 's/^....//')" --title="mpv - embedded" $1 </dev/null])
define(MP_EMBED,[swallow(mpv): MP_CMD($1)])
define(MP_VIDEO_STREAM,[stream MP_EMBED($1 "$file")])

Zehkul avatar Sep 12 '14 19:09 Zehkul

Seems to suffer from the same problem as --wid. Do you not have the issue on 0.5.3?

alexwh avatar Sep 12 '14 19:09 alexwh

Works for me, both git master and 0.5.3. Did you run mozplugger-update? Any error messages there? (Openbox here, by the way)

Zehkul avatar Sep 12 '14 19:09 Zehkul

~~Not any errors of significance, no. Just things like "can't find totem" and such.~~ Actually, I changed MP_VIDEO_STREAM and MP_CMD to match yours also and now it seems to work fine (since title wasn't being set).

I'll leave this open as the --wid issue might still be relevant, though my personal issue is solved. Feel free to close.

alexwh avatar Sep 12 '14 20:09 alexwh

MPlayer does not have this problem? I thought we explicitly restored MPlayer behavior for --wid.

ghost avatar Sep 12 '14 22:09 ghost

I can't seem to get MPlayer to work (similar issue; no keyboard input gets through), though it is the default in mozplugger so I'd expect it would work for most other users. mpv did work before this commit, however.

alexwh avatar Sep 13 '14 02:09 alexwh

MPlayer does not have this problem?

Not for me at least.

Zehkul avatar Sep 13 '14 17:09 Zehkul

So does MPlayer work or not? Which is it? Looking at the MPlayer code, it might actually be different for different VOs... can't really tell.

Maybe I'll try it myself later... if I can get this mozplugger thing to work.

ghost avatar Sep 14 '14 08:09 ghost

So how do I get this mess of mozplugger/viewtube/firefox/mpv to work?

ghost avatar Sep 14 '14 09:09 ghost

Okay sorry, should have tested more thoroughly, turns out just using the default configuration did work … because it actually uses swallow and not --wid in the cases I tested. Yes, for some strange reason it uses both (would be interesting to know why). So this maybe worked in 2006 and no one tested ever since?

So how do I get this mess of mozplugger/viewtube/firefox/mpv to work?

Debian still only has mozplugger 1.14 for some reason, so it’s even possible that it would work for you anyway then.

Zehkul avatar Sep 14 '14 19:09 Zehkul

Debian still only has mozplugger 1.14 for some reason, so it’s even possible that it would work for you anyway then.

Firefox (iceweasel 31.1.0) doesn't even recognize the mozplugger plugin (lists it as invalid in pluginreg.dat).

From what I've read, it would be best to make it work with --wid and without "swallow".

ghost avatar Sep 14 '14 19:09 ghost

From what I've read, it would be best to make it work with --wid and without "swallow".

All the difference I’ve noticed is that from time to time the window pops up for a few milliseconds before it gets swallowed. Maybe it’s also more reliable? Swallow could also grab the wrong mpv window I guess? I haven’t noticed any problems either way though.

Zehkul avatar Sep 14 '14 20:09 Zehkul

PS: can't do anything without a way to reproduce

ghost avatar Sep 15 '14 22:09 ghost

Since I couldn't get mozplugger to work, I implemented a shitty hack in 3273db1ef72a9d1ee76ba704ace6c1b1898ab945, which should make it possible to make this work again. Have fun.

ghost avatar Sep 28 '14 18:09 ghost

Thanks, seems to work. No idea why it wouldn’t work for you, other Debian users I’ve talked to just said it worked out of the box.

Mpv seems to appear 24 pixels below where it should now though? Since 8c002b79, what’s up with that? (--no-keepaspect and any resizing “fix” it)

Zehkul avatar Sep 28 '14 22:09 Zehkul