xwayland/glamor: Drop expecting_event bailing from xwl_drm_handle_device
If we bail without decrementing xwl_screen->expecting_event,
xwl_screen_init will keep waiting indefinitely for an event which never
arrives.
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1648
Fixes: 2f113d68f6 ("xwayland: Add glamor and DRI3 support")
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1739>
			
			
This commit is contained in:
		
							parent
							
								
									a1b5aa5a7f
								
							
						
					
					
						commit
						375c35a5e4
					
				|  | @ -1318,6 +1318,7 @@ xwl_drm_handle_device(void *data, struct wl_drm *drm, const char *device) | ||||||
| 
 | 
 | ||||||
|    if (!xwl_gbm->device_name) { |    if (!xwl_gbm->device_name) { | ||||||
|        xwl_glamor_gbm_cleanup(xwl_screen); |        xwl_glamor_gbm_cleanup(xwl_screen); | ||||||
|  |        xwl_screen->expecting_event--; | ||||||
|        return; |        return; | ||||||
|    } |    } | ||||||
| 
 | 
 | ||||||
|  | @ -1326,12 +1327,14 @@ xwl_drm_handle_device(void *data, struct wl_drm *drm, const char *device) | ||||||
|        ErrorF("wayland-egl: could not open %s (%s)\n", |        ErrorF("wayland-egl: could not open %s (%s)\n", | ||||||
|               xwl_gbm->device_name, strerror(errno)); |               xwl_gbm->device_name, strerror(errno)); | ||||||
|        xwl_glamor_gbm_cleanup(xwl_screen); |        xwl_glamor_gbm_cleanup(xwl_screen); | ||||||
|  |        xwl_screen->expecting_event--; | ||||||
|        return; |        return; | ||||||
|    } |    } | ||||||
| 
 | 
 | ||||||
|    if (drmGetDevice2(xwl_gbm->drm_fd, 0, &xwl_gbm->device) != 0) { |    if (drmGetDevice2(xwl_gbm->drm_fd, 0, &xwl_gbm->device) != 0) { | ||||||
|        ErrorF("wayland-egl: Could not fetch DRM device %s\n", |        ErrorF("wayland-egl: Could not fetch DRM device %s\n", | ||||||
|               xwl_gbm->device_name); |               xwl_gbm->device_name); | ||||||
|  |        xwl_screen->expecting_event--; | ||||||
|        return; |        return; | ||||||
|    } |    } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue