[nautilus] list-base: Fix double click issue in gesture handling



commit 7f10a7f057147c838c5aa517c1347245a882c415
Author: Corey Berla <corey berla me>
Date:   Mon Jun 27 17:59:37 2022 -0700

    list-base: Fix double click issue in gesture handling
    
    Double clicking a folder will cause the deny_background_click
    flag to remain TRUE thereby breaking the ability to left or right
    click on background (to clear selection or popup context menu).
    This happens because the new view is activated before
    on_item_click_stopped() is called after the second click.
    
    Reset deny_background_click to FALSE in real_begin_loading()

 src/nautilus-list-base.c | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/src/nautilus-list-base.c b/src/nautilus-list-base.c
index 5fcb3c97d..d176d61ed 100644
--- a/src/nautilus-list-base.c
+++ b/src/nautilus-list-base.c
@@ -517,6 +517,9 @@ typedef struct
 static void
 real_begin_loading (NautilusFilesView *files_view)
 {
+    NautilusListBase *self = NAUTILUS_LIST_BASE (files_view);
+    NautilusListBasePrivate *priv = nautilus_list_base_get_instance_private (self);
+
     /*TODO move this to the files view class begin_loading and hook up? */
 
 
@@ -529,6 +532,10 @@ real_begin_loading (NautilusFilesView *files_view)
      * we need to update the menus */
     nautilus_files_view_update_context_menus (files_view);
     nautilus_files_view_update_toolbar_menus (files_view);
+
+    /* When double clicking on an item this deny_background_click can persist
+     * because the new view interrupts the gesture sequence, so lets reset it.*/
+    priv->deny_background_click = FALSE;
 }
 
 static void


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