Fix X11 SHM version check.

If you want >= 1.2 then the old code doesn't do what you want.
This commit is contained in:
Carlo Wood 2025-03-04 21:03:43 +01:00 committed by Carlo Wood
parent 94cb8e2bc7
commit 410c96eca9

View file

@ -473,7 +473,8 @@ struct wlr_backend *wlr_x11_backend_create(struct wl_event_loop *loop,
xcb_shm_query_version_reply_t *shm_reply = xcb_shm_query_version_reply_t *shm_reply =
xcb_shm_query_version_reply(x11->xcb, shm_cookie, NULL); xcb_shm_query_version_reply(x11->xcb, shm_cookie, NULL);
if (shm_reply) { if (shm_reply) {
if (shm_reply->major_version >= 1 || shm_reply->minor_version >= 2) { if (shm_reply->major_version > 1 ||
(shm_reply->major_version == 1 && shm_reply->minor_version >= 2)) {
if (shm_reply->shared_pixmaps) { if (shm_reply->shared_pixmaps) {
x11->have_shm = true; x11->have_shm = true;
} else { } else {