Avoid gdk_display_get_name() on OS X
More in the comment.
This commit is contained in:
parent
170ebf610f
commit
ed46b65c00
@ -284,8 +284,15 @@ gint socket_init(gint argc, gchar **argv)
|
||||
GdkDisplay *display = gdk_display_get_default();
|
||||
gchar *p;
|
||||
|
||||
/* On OS X with quartz backend gdk_display_get_name() returns hostname
|
||||
* using [NSHost currentHost] (it could return more or less whatever string
|
||||
* as display name is a X11 specific thing). This call can lead to network
|
||||
* query and block for several seconds so better skip it. */
|
||||
#ifndef GDK_WINDOWING_QUARTZ
|
||||
if (display != NULL)
|
||||
display_name = g_strdup(gdk_display_get_name(display));
|
||||
#endif
|
||||
|
||||
if (display_name == NULL)
|
||||
display_name = g_strdup("NODISPLAY");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user