The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix DRM leasing on some compositors after !2278

At the suggestion of @Supreeeme, this makes a change to some code I added to
the connector withdrawn handler in !2278 that causes an error when leasing
is attempted on some wayland compositors, namely niri.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2283>

authored by

Joel Valenciano and committed by
Marge Bot
f9d02319 c6d341a9

+2 -2
+2 -2
src/xrt/compositor/main/comp_window_direct_wayland.c
··· 168 168 VkResult ret = VK_ERROR_INCOMPATIBLE_DISPLAY_KHR; 169 169 170 170 if (w->selected_device == NULL || w->selected_connector == NULL || w->lease == NULL) { 171 - COMP_ERROR(w->base.base.c, "Connector disconnected before it could be acquired"); 171 + COMP_ERROR(w->base.base.c, "Connector was disconnected before it could be acquired"); 172 172 return VK_ERROR_INITIALIZATION_FAILED; 173 173 } 174 174 ··· 280 280 { 281 281 struct direct_wayland_lease_connector *conn = data; 282 282 COMP_DEBUG(conn->w->base.base.c, "Connector %s has been withdrawn by the compositor", conn->name); 283 - if (conn == conn->w->selected_connector) { 283 + if (conn == conn->w->selected_connector && !conn->w->lease->lease) { 284 284 conn->w->selected_connector = NULL; 285 285 } 286 286 }