On X11 display name :0 is equivalent to :0.0

Fixes: https://bugs.launchpad.net/midori/+bug/874719
This commit is contained in:
Christian Dywan 2012-05-12 03:21:01 +02:00
parent b29e1278f9
commit bc967c5563

View file

@ -734,7 +734,12 @@ midori_app_create_instance (MidoriApp* app)
#endif #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)); display_name = g_strdup (gdk_display_get_name (display));
#endif
n = strlen (display_name); n = strlen (display_name);
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
if (strchr (":.\\/", display_name[i])) if (strchr (":.\\/", display_name[i]))