From: Christian Dywan Date: Sat, 12 May 2012 01:21:01 +0000 (+0200) Subject: On X11 display name :0 is equivalent to :0.0 X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc967c55639ff34f87ff1c6a0d7333851a7170d6;p=midori On X11 display name :0 is equivalent to :0.0 Fixes: https://bugs.launchpad.net/midori/+bug/874719 --- diff --git a/midori/midori-app.c b/midori/midori-app.c index 84d50258..8c361f9b 100644 --- a/midori/midori-app.c +++ b/midori/midori-app.c @@ -734,7 +734,12 @@ midori_app_create_instance (MidoriApp* app) #endif } + #ifdef GDK_WINDOWING_X11 + /* On X11: :0 or :0.0 which is equivalent */ + display_name = g_strndup (gdk_display_get_name (display), 2); + #else display_name = g_strdup (gdk_display_get_name (display)); + #endif n = strlen (display_name); for (i = 0; i < n; i++) if (strchr (":.\\/", display_name[i]))