Save default Gtk+ display in the command line for session restoration.

Mon, 17 Sep 2007 00:42:17 +0000

author
Ethan Blanton <elb@pidgin.im>
date
Mon, 17 Sep 2007 00:42:17 +0000
changeset 20347
b7de12671217
parent 20346
06c3e9cfdc27
child 20348
984a9d54f84f

Save default Gtk+ display in the command line for session restoration.

Fixes #3137

pidgin/gtksession.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtksession.c	Mon Sep 17 00:40:32 2007 +0000
+++ b/pidgin/gtksession.c	Mon Sep 17 00:42:17 2007 +0000
@@ -36,6 +36,7 @@
 #include <gdk/gdkx.h>
 #include <unistd.h>
 #include <fcntl.h>
+#include <gdk/gdk.h>
 
 #define ERROR_LENGTH 512
 
@@ -141,7 +142,7 @@
 /* my magic utility function */
 
 static gchar **session_make_command(gchar *client_id, gchar *config_dir) {
-	gint i = 2;
+	gint i = 4;
 	gint j = 0;
 	gchar **ret;
 
@@ -161,6 +162,9 @@
 		ret[j++] = g_strdup(config_dir);
 	}
 
+	ret[j++] = g_strdup("--display");
+	ret[j++] = g_strdup((gchar *)gdk_display_get_name(gdk_display_get_default()));
+
 	ret[j++] = NULL;
 
 	return ret;

mercurial