[nautilus/wip/ernestask/649] window-slot: Return pending location if no current one



commit 5dda0f0462cd2dfc24dea6ba501a030ba02311f9
Author: Ernestas Kulik <ernestask gnome org>
Date:   Tue Sep 25 09:26:00 2018 +0300

    window-slot: Return pending location if no current one
    
    If nautilus_window_slot_get_location() is called while it’s still
    loading, the value returned will be null. This particularly affects the
    clone-window action, as it takes the current location of the active slot
    in the usual case. That can be fixed by making the slot return its
    pending location conditionally.
    
    Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/649

 src/nautilus-window-slot.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index b3a7bc211..68ff152dc 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -3229,6 +3229,11 @@ nautilus_window_slot_get_location (NautilusWindowSlot *self)
 
     priv = nautilus_window_slot_get_instance_private (self);
 
+    if (priv->location == NULL)
+    {
+        return priv->pending_location;
+    }
+
     return priv->location;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]