commit 539c299f783535b00cae257dde6ef42f8fb3df50
parent c3fc28501b99bddb928f1c046b6ec5c48c7622a4
Author: Andrej Kacian <ticho@claws-mail.org>
Date: Sun, 20 Jan 2019 19:41:00 +0100
Disable operations around the x_display variable on non-Unix
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/main.c b/src/main.c
@@ -171,7 +171,9 @@ static SnDisplay *sn_display = NULL;
static gint lock_socket = -1;
static gint lock_socket_tag = 0;
+#ifdef G_OS_UNIX
static gchar *x_display = NULL;
+#endif
typedef enum
{
ONLINE_MODE_DONT_CHANGE,
@@ -2447,7 +2449,7 @@ static gint prohibit_duplicate_launch(void)
claws_fputs(buf, stdout);
}
} else {
-#ifndef G_OS_WIN32
+#ifdef G_OS_UNIX
gchar buf[BUFSIZ];
fd_write_all(uxsock, "get_display\n", 12);
memset(buf, 0, sizeof(buf));
@@ -2539,8 +2541,10 @@ static void lock_socket_input_cb(gpointer data,
if (!strncmp(buf, "popup", 5)) {
main_window_popup(mainwin);
+#ifdef G_OS_UNIX
} else if (!strncmp(buf, "get_display", 11)) {
fd_write_all(sock, x_display, strlen(x_display));
+#endif
} else if (!strncmp(buf, "receive_all", 11)) {
inc_all_account_mail(mainwin, FALSE, FALSE,
prefs_common.newmail_notify_manu);