[gtk3/wayland] Only request v2 of xdg_wm_base.

This fixes potential runtime crashes in some somewhat unlikely
configurations, like a modern compositor but gtk built against an old
wayland protocols version.

We only need v2 for the tiling fixes, so request that.
This commit is contained in:
Emilio Cobos Álvarez 2023-12-15 15:50:29 +01:00
parent 6ff6bf7af2
commit 1f0f7820cb
No known key found for this signature in database
GPG Key ID: E1152D0994E4BF8A

View File

@ -653,7 +653,7 @@ _gdk_wayland_display_open (const gchar *display_name)
wl_registry_bind (display_wayland->wl_registry,
display_wayland->xdg_wm_base_id,
&xdg_wm_base_interface,
MIN (display_wayland->xdg_wm_base_version, 6));
MIN (display_wayland->xdg_wm_base_version, 2));
xdg_wm_base_add_listener (display_wayland->xdg_wm_base,
&xdg_wm_base_listener,
display_wayland);