[geany/geany] ed46b6: Avoid gdk_display_get_name() on OS X

Jiří Techet git-noreply at xxxxx
Thu Feb 16 10:45:46 UTC 2017

Branch:      refs/heads/master
Author:      Jiří Techet <techet at gmail.com>
Committer:   Jiří Techet <techet at gmail.com>
Date:        Thu, 16 Feb 2017 10:45:46 UTC
Commit:      ed46b65c00ff3b5c33782a8761c75b47fa953b52

Log Message:
Avoid gdk_display_get_name() on OS X

More in the comment.

Modified Paths:

Modified: src/socket.c
7 lines changed, 7 insertions(+), 0 deletions(-)
@@ -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. */
 	if (display != NULL)
 		display_name = g_strdup(gdk_display_get_name(display));
 	if (display_name == NULL)
 		display_name = g_strdup("NODISPLAY");

This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).

More information about the Commits mailing list