summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Ekström <jeebjp@gmail.com>2022-10-22 19:40:37 +0300
committerJan Ekström <jeebjp@gmail.com>2022-10-26 22:20:31 +0300
commitf39e56bf5e482b98688909161bc5be0bdeaa82ce (patch)
tree77d84e9a0cf59048d079846401041c0312ca0f0e
parent2c58ab481be47159e2b412bdd34b5155a6a768a6 (diff)
downloadmpv-f39e56bf5e482b98688909161bc5be0bdeaa82ce.tar.bz2
mpv-f39e56bf5e482b98688909161bc5be0bdeaa82ce.tar.xz
video/out/wayland_common: don't pass a negative of border flag into ternary
Make it clear that we are passing the original requested border mode on.
-rw-r--r--video/out/wayland_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index 3af223fae4..eab8ec4f14 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -1757,11 +1757,12 @@ int vo_wayland_control(struct vo *vo, int *events, int request, void *arg)
// unless we get a configure event. Change it back to its old
// value and let configure_decorations handle it after the request.
if (wl->xdg_toplevel_decoration) {
+ int requested_border_mode = opts->border;
opts->border = !opts->border;
m_config_cache_write_opt(wl->vo_opts_cache,
&opts->border);
request_decoration_mode(
- wl, !opts->border ?
+ wl, requested_border_mode ?
ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE :
ZXDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE);
} else {