]> spindle.queued.net Git - midori/commitdiff
On X11 display name :0 is equivalent to :0.0
authorChristian Dywan <christian@twotoasts.de>
Sat, 12 May 2012 01:21:01 +0000 (03:21 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 12 May 2012 01:21:01 +0000 (03:21 +0200)
Fixes: https://bugs.launchpad.net/midori/+bug/874719
midori/midori-app.c

index 84d50258016532c437a0d000bf25170974a0236b..8c361f9b62e844f28b74d4cec5d42da7e58fd7c9 100644 (file)
@@ -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]))