summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarlos Soriano <csoriano@gnome.org>2015-11-12 17:06:09 +0100
committerCarlos Soriano <csoriano@gnome.org>2015-11-12 21:43:11 +0100
commitcff78578999d56d59813e31a0f483ead11c8c579 (patch)
treedf19a07483af42462da81ea67f682dd6cec77242 /src
parente5163bab0c95e4490a0d90618093f483d34a299c (diff)
downloadnautilus-cff78578999d56d59813e31a0f483ead11c8c579.tar.gz
window: explicitily set active window
We were relying on getting the current active window from gtk to switch open locations, but what people found is that some times another window change its location instead of the current one. I couldn't figure out the root of the problem, so I'm going to pass explicitly the window on the callers as previous 3.18 we were doing. Would be cool to find the root of the problem though... https://bugzilla.gnome.org/show_bug.cgi?id=756499
Diffstat (limited to 'src')
-rw-r--r--src/nautilus-application.c4
-rw-r--r--src/nautilus-window.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 218769292..ccfbf008a 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -446,6 +446,10 @@ nautilus_application_open_location_full (NautilusApplication *application,
gboolean use_same;
use_same = TRUE;
+ /* FIXME: We are having problems on getting the current focused window with
+ * gtk_application_get_active_window, see https://bugzilla.gnome.org/show_bug.cgi?id=756499
+ * so what we do is never rely on this on the callers, but would be cool to
+ * make it work withouth explicitly setting the active window on the callers. */
active_window = NAUTILUS_WINDOW (gtk_application_get_active_window (GTK_APPLICATION (application)));
active_slot = nautilus_window_get_active_slot (active_window);
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 8e7230e36..912b79c80 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -926,8 +926,11 @@ open_location_cb (NautilusWindow *window,
break;
}
+ /* FIXME: We shouldn't need to provide the window, but seems gtk_application_get_active_window
+ * is not working properly in GtkApplication, so we cannot rely on that...
+ */
nautilus_application_open_location_full (NAUTILUS_APPLICATION (g_application_get_default ()),
- location, flags, NULL, NULL, NULL);
+ location, flags, NULL, window, NULL);
}
/* Callback used when the places sidebar needs us to present an error message */