summaryrefslogtreecommitdiff
path: root/wayland.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2008-12-21 20:04:10 -0500
committerRay Strode <rstrode@redhat.com>2008-12-22 09:40:04 -0800
commit350b58f91f0b4a5b8237f2f83ca5018d3d121995 (patch)
tree49c903768c6ec610ef852ae96399039673d97dba /wayland.c
parent28b1542d6d94ab7cd40136219b35a2b4f80cd54a (diff)
Create loop in a main() and pass to ec constructor
We'll need to the loop before the ec is created.
Diffstat (limited to 'wayland.c')
-rw-r--r--wayland.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/wayland.c b/wayland.c
index e402253..c1bb637 100644
--- a/wayland.c
+++ b/wayland.c
@@ -464,7 +464,7 @@ static const struct wl_interface display_interface = {
};
WL_EXPORT struct wl_display *
-wl_display_create(void)
+wl_display_create(struct wl_event_loop *loop)
{
struct wl_display *display;
@@ -472,11 +472,7 @@ wl_display_create(void)
if (display == NULL)
return NULL;
- display->loop = wl_event_loop_create();
- if (display->loop == NULL) {
- free(display);
- return NULL;
- }
+ display->loop = loop;
display->objects = wl_hash_create();
if (display->objects == NULL) {