mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-04 19:08:23 +00:00
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
This commit is contained in:
parent
773fc4bdb7
commit
49c03251ee
2 changed files with 8 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue