[PATCH 1/2] wl/wayland_client: rename wl_display_create to wl_display_connect
Benjamin Franzke
benjaminfranzke at googlemail.com
Sat Nov 27 10:04:11 PST 2010
avoid conflict when using wayland-{server,client} together
later to be fixed (not important now):
redifinition of WL_DISPLAY_{SYNC,FRAME}
in wayland-{server,client}-protocol.h
---
clients/screenshot.c | 2 +-
clients/window.c | 2 +-
wayland/wayland-client.c | 2 +-
wayland/wayland-client.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/clients/screenshot.c b/clients/screenshot.c
index e9fa5aa..8b7dd8b 100644
--- a/clients/screenshot.c
+++ b/clients/screenshot.c
@@ -54,7 +54,7 @@ int main(int argc, char *argv[])
GSource *source;
struct wl_screenshooter *screenshooter;
- display = wl_display_create(socket_name, sizeof socket_name);
+ display = wl_display_connect(socket_name, sizeof socket_name);
if (display == NULL) {
fprintf(stderr, "failed to create display: %m\n");
return -1;
diff --git a/clients/window.c b/clients/window.c
index bc76937..23e975b 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -1425,7 +1425,7 @@ display_create(int *argc, char **argv[], const GOptionEntry *option_entries)
if (d == NULL)
return NULL;
- d->display = wl_display_create(socket_name, sizeof socket_name);
+ d->display = wl_display_connect(socket_name, sizeof socket_name);
if (d->display == NULL) {
fprintf(stderr, "failed to create display: %m\n");
return NULL;
diff --git a/wayland/wayland-client.c b/wayland/wayland-client.c
index 9715307..ebc076c 100644
--- a/wayland/wayland-client.c
+++ b/wayland/wayland-client.c
@@ -337,7 +337,7 @@ static const struct wl_display_listener display_listener = {
};
WL_EXPORT struct wl_display *
-wl_display_create(const char *name, size_t name_size)
+wl_display_connect(const char *name, size_t name_size)
{
struct wl_display *display;
struct sockaddr_un addr;
diff --git a/wayland/wayland-client.h b/wayland/wayland-client.h
index 4fcb00b..6ebf9ac 100644
--- a/wayland/wayland-client.h
+++ b/wayland/wayland-client.h
@@ -37,7 +37,7 @@ typedef int (*wl_display_update_func_t)(uint32_t mask, void *data);
typedef void (*wl_display_sync_func_t)(void *data);
typedef void (*wl_display_frame_func_t)(void *data, uint32_t time);
-struct wl_display *wl_display_create(const char *name, size_t name_size);
+struct wl_display *wl_display_connect(const char *name, size_t name_size);
void wl_display_destroy(struct wl_display *display);
int wl_display_get_fd(struct wl_display *display,
wl_display_update_func_t update, void *data);
--
1.7.2.2
More information about the wayland-devel
mailing list