mirror of https://github.com/mpv-player/mpv
69c64f5fc4
The current usage of the xdg-decoration protocol is quite a bit crude. There's a specific listener struct for this like with most wayland things, but mpv wasn't even using it. It also made no attempt to detect if the compositor was telling mpv to use client side decorations. To implement this correctly, first of all we need to create the decoration listener object and add it like how most wayland things work. Secondly, set_border_decorations needs to be changed to accept the uint32_t mode given by the compositor. When we get the decoration event, pass the mode obtained from the compositor to set_border_decorations. Update the mpv border option, based on whether or not we have server side decorations (yes if we have them; no if we don't). mpv can actually request either client side or server side decorations with this protocol. This function doesn't belong in set_border_decorations but rather it should be called when the border option changes. Whether or not this request actually works depends on the compositor (Plasma appears to allow it; sway does not). If the compositor allows this request, then it gets handled by configure_decorations. Note that the enum strangely starts at 1 hence why there is an extra +1. |
||
---|---|---|
.. | ||
decode | ||
filter | ||
out | ||
csputils.c | ||
csputils.h | ||
cuda.c | ||
d3d.c | ||
d3d.h | ||
fmt-conversion.c | ||
fmt-conversion.h | ||
hwdec.c | ||
hwdec.h | ||
image_loader.c | ||
image_loader.h | ||
image_writer.c | ||
image_writer.h | ||
img_format.c | ||
img_format.h | ||
mp_image.c | ||
mp_image.h | ||
mp_image_pool.c | ||
mp_image_pool.h | ||
repack.c | ||
repack.h | ||
sws_utils.c | ||
sws_utils.h | ||
vaapi.c | ||
vaapi.h | ||
vdpau.c | ||
vdpau.h | ||
vdpau_functions.inc | ||
vdpau_mixer.c | ||
vdpau_mixer.h | ||
zimg.c | ||
zimg.h |