MPV's WM_CLASS breaks mpv's appmenu on X11

It seems that, due to a recent update, the mpv's appmenu no longer works under X11.

The WM_CLASS returned by xprop is "gl", "mpv", but according to sxmo_hook_contextmenu.sh, it used to be just "mpv".

I don't really see the reason for this change in MPV (might be an upstream bug?). The easy fix would be to replace *mpv* by gl in the contextmenu hook (maybe some other programs use gl in their WM_CLASS though).

An other possibility would be to match against the full WM_CLASS instead of taking the first field.

The experience is really great so far, many thanks for the great work!

Assigned to
1 year, 7 months ago
1 year, 7 months ago
No labels applied.

~eolien55 1 year, 7 months ago*

Looking more in detail at the code in sxmo_wm.sh for function swayfocusedwindow it seems very likely that the two proposed solutions would break MPV's appmenu on the wayland side (if the app_id is mpv there).

One more solution could be to manually set mpv's WM_CLASS via xprop, or to ask the MPV devs about the issue (it may be a bug).

~eolien55 1 year, 7 months ago

The problem effectively occurs only on the X11 side. I will open an issue about that on mpv's repo.

~eolien55 1 year, 7 months ago*

Actually this is just normal mpv behaviour

Register here or Log in to comment, or comment via email.