From 539c06f94d935cd5caf521a3cb8fb68d45c00eed Mon Sep 17 00:00:00 2001 From: Dery Almas Date: Fri, 13 Feb 2026 01:59:48 +0100 Subject: [PATCH] Wayland: Only handle the current output mode Some compositors (e.g. COSMIC) can report *all* supported output modes, not just the current mode. This is valid, albeit deprecated, so let's add a check and ignore any non-current output events. (cherry picked from commit dc8e7ef2ce5deb8353a688951e9686f4510629a6) --- platform/linuxbsd/wayland/wayland_thread.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/linuxbsd/wayland/wayland_thread.cpp b/platform/linuxbsd/wayland/wayland_thread.cpp index c2cefe629f..0223ff0e1d 100644 --- a/platform/linuxbsd/wayland/wayland_thread.cpp +++ b/platform/linuxbsd/wayland/wayland_thread.cpp @@ -1287,6 +1287,10 @@ void WaylandThread::_wl_output_on_mode(void *data, struct wl_output *wl_output, ScreenState *ss = (ScreenState *)data; ERR_FAIL_NULL(ss); + if (!(flags & WL_OUTPUT_MODE_CURRENT)) { + return; + } + ss->pending_data.size.width = width; ss->pending_data.size.height = height;