summaryrefslogtreecommitdiff
path: root/src/nautilus-window.c
diff options
context:
space:
mode:
authorErnestas Kulik <ernestask@gnome.org>2018-08-01 18:30:42 +0300
committerErnestas Kulik <ernestas.kulik@gmail.com>2018-08-02 13:22:39 +0000
commit970ff5c0b746b59610ca3bdee05683d4ae4cc4d4 (patch)
treeb7d64aebb78ae2a4e2190454e3bc071a4f288115 /src/nautilus-window.c
parent116845d4fc46a5134c603e43634f7c2128082971 (diff)
downloadnautilus-970ff5c0b746b59610ca3bdee05683d4ae4cc4d4.tar.gz
window-slot: Go home instead of closing slot on failure
Currently, the window slot is closed if there happens to be a failure while changing location. Additionally, that causes a crash in Mutter on Wayland, likely due to very unfortunate timing of opening a transient dialog and closing the window. The issue can be fixed by going home, instead, when there is an error. Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/562
Diffstat (limited to 'src/nautilus-window.c')
-rw-r--r--src/nautilus-window.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 824bdf0b1..6bef2065b 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -909,6 +909,7 @@ open_location_cb (NautilusWindow *window,
GtkPlacesOpenFlags open_flags)
{
NautilusWindowOpenFlags flags;
+ NautilusApplication *application;
switch (open_flags)
{
@@ -933,11 +934,12 @@ open_location_cb (NautilusWindow *window,
break;
}
+ application = NAUTILUS_APPLICATION (g_application_get_default ());
/* 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, window, NULL);
+ nautilus_application_open_location_full (application, location, flags,
+ NULL, window, NULL);
}
static void