Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: Jiří Techet <techet(a)gmail.com>
Date: Thu, 16 Feb 2017 10:45:46 UTC
Commit: ed46b65c00ff3b5c33782a8761c75b47fa953b52
https://github.com/geany/geany/commit/ed46b65c00ff3b5c33782a8761c75b47fa953…
Log Message:
-----------
Avoid gdk_display_get_name() on OS X
More in the comment.
Modified Paths:
--------------
src/socket.c
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. */
+#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");
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).