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)
This commit is contained in:
Dery Almas
2026-02-13 01:59:48 +01:00
committed by Thaddeus Crews
parent e226db088c
commit 539c06f94d
@@ -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;