Patch to allow open nautilus window on any screen

Alberts Muktupāvels <[email protected]>
Newsgroups gmane.comp.gnome.nautilus
Message-ID <CAKX6tkV-GEJJq1FsQ=zv7hoNSZz79gA-nohgvYB6DoX2UBJbDw@mail.gmail.com>
Hi!

Created patch for this bug -
https://bugzilla.gnome.org/show_bug.cgi?id=705317. With this patch I can
open nautilus on each screen. Seems that patch doesn't break anything.
Patch is attached to bug and this e-mail.

-- 
nautilus-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/nautilus-list
open-windows-on-correct-screen.patch (application/octet-stream, 956 B)
## Description: Open windows on correct screen.
## Origin/Author: Alberts Muktupāvels <[email protected]>
## Bug: https://bugzilla.gnome.org/show_bug.cgi?id=705317
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -1849,8 +1849,20 @@
 NautilusApplication *
 nautilus_application_new (void)
 {
+	const gchar *display = g_getenv ("DISPLAY");
+	const gchar *application_id = "org.gnome.Nautilus";
+
+	if (display != NULL) {
+		int number_display;
+		int number_screen;
+		
+		if (sscanf (display, ":%d.%d", &number_display, &number_screen) == 2) {
+			application_id = g_strdup_printf ("org.gnome.Nautilus.Display_%d_%d", number_display, number_screen);
+		}
+	}
+	
 	return g_object_new (NAUTILUS_TYPE_APPLICATION,
-			     "application-id", "org.gnome.Nautilus",
+			     "application-id", application_id,
 			     "flags", G_APPLICATION_HANDLES_OPEN,
 			     "inactivity-timeout", 12000,
 			     "register-session", TRUE,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.