summaryrefslogtreecommitdiff
path: root/gdk/wayland/gdkdisplay-wayland.c
diff options
context:
space:
mode:
authorRob Bradford <rob@linux.intel.com>2013-04-19 13:59:58 +0100
committerRob Bradford <rob@linux.intel.com>2013-04-19 14:03:24 +0100
commit524ce7f88e26a498c43729f99fda564f5e222582 (patch)
tree9d47d4477ffea003ce7a8f2f29ab04c56bf902e2 /gdk/wayland/gdkdisplay-wayland.c
parent3df715a511572222316b2d682ca250c8ce232a04 (diff)
downloadgtk+-524ce7f88e26a498c43729f99fda564f5e222582.tar.gz
wayland: Cache the discovery connection and reuse if possible
This will prevent us opening, closing and reopening the same display connection in the majority of cases. https://bugzilla.gnome.org/show_bug.cgi?id=694465
Diffstat (limited to 'gdk/wayland/gdkdisplay-wayland.c')
-rw-r--r--gdk/wayland/gdkdisplay-wayland.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index ee42ea9c8d..06bbf49225 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -214,18 +214,13 @@ log_handler(const char *format, va_list args)
}
GdkDisplay *
-_gdk_wayland_display_open (const gchar *display_name)
+_gdk_wayland_display_open (struct wl_display *wl_display)
{
- struct wl_display *wl_display;
GdkDisplay *display;
GdkWaylandDisplay *display_wayland;
wl_log_set_handler_client(log_handler);
- wl_display = wl_display_connect(display_name);
- if (!wl_display)
- return NULL;
-
display = g_object_new (GDK_TYPE_WAYLAND_DISPLAY, NULL);
display_wayland = GDK_WAYLAND_DISPLAY (display);