From f39e56bf5e482b98688909161bc5be0bdeaa82ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= Date: Sat, 22 Oct 2022 19:40:37 +0300 Subject: [PATCH] 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. --- video/out/wayland_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 {