summaryrefslogtreecommitdiff
path: root/src/egl/drivers
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2013-02-26 12:49:40 -0500
committerKristian Høgsberg <krh@bitplanet.net>2013-02-26 12:49:49 -0500
commit112ccfab44eb3e23a516209c3be8b2f0107adb47 (patch)
tree5a73c76790e2cdabe0fc144a1a8a75b1d98ed88e /src/egl/drivers
parent68a147e9a9e8f171d9aacdc7d78d2107009c4741 (diff)
egl/wayland: Don't block on EGL_DEFAULT_DISPAY under wayland
Normally the application will own the main event queue and be responsible for moving events. In case of EGL_DEFAULT_DISPLAY, EGL opens the display and has to own the main queue so it can move the events itself. Call wl_display_dispatch_pending() to take ownership.
Diffstat (limited to 'src/egl/drivers')
-rw-r--r--src/egl/drivers/dri2/platform_wayland.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 99d8729cfc1..6e702abe895 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -679,6 +679,10 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
}
dri2_dpy->wl_queue = wl_display_create_queue(dri2_dpy->wl_dpy);
+
+ if (dri2_dpy->own_device)
+ wl_display_dispatch_pending(dri2_dpy->wl_dpy);
+
dri2_dpy->wl_registry = wl_display_get_registry(dri2_dpy->wl_dpy);
wl_proxy_set_queue((struct wl_proxy *) dri2_dpy->wl_registry,
dri2_dpy->wl_queue);