After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751448 - Bookmarks sometimes disappear when dragging them away
Bookmarks sometimes disappear when dragging them away
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
3.17.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Carlos Soriano
Depends on:
Blocks:
 
 
Reported: 2015-06-24 16:16 UTC by Timm Bäder
Modified: 2015-07-08 03:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screencast showing the problem (230.20 KB, video/ogg)
2015-06-24 16:16 UTC, Timm Bäder
Details

Description Timm Bäder 2015-06-24 16:16:49 UTC
Created attachment 306023 [details]
Screencast showing the problem

So, sometimes when I drag a bookmark out of the sidebar in a filechooser and the drag fails (needed?), the bookmark simply disappears from the sidebar.

Screencast attached.
Comment 1 Matthias Clasen 2015-06-26 14:25:46 UTC
Carlos, can you have a look ?
Comment 2 Carlos Soriano 2015-06-27 19:19:15 UTC
Did you do something previously? Like adding a new bookmark, or dragging from the file chooser to show the new bookmark or something?

Can't reproduce here for now (and not obvious error on the code).
Comment 3 Timm Bäder 2015-06-29 07:24:27 UTC
No, it's an ordinary bookmark (I created before the GtkPlacesSidebar rewrite).
Comment 4 Matthias Clasen 2015-07-07 04:29:37 UTC
My recipe for reproducing this:

1) drag a bookmark down over empty space in the sidebar
2) let it go
3) move the pointer out of the sidebar before the snap-back animation is done
4) the bookmark goes missing!
Comment 5 Matthias Clasen 2015-07-07 04:38:23 UTC
This seems to fix it for me. Not sure why that line was there - Carlos ?

diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index a591ea5..322b7f1 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -1456,11 +1456,7 @@ on_motion_notify_event (GtkWidget      *widget,
     return FALSE;
 
   if (!(event->state & GDK_BUTTON1_MASK))
-    {
-      sidebar->drag_row = NULL;
-
-      return FALSE;
-    }
+    return FALSE;
 
   if (gtk_drag_check_threshold (widget,
                                 sidebar->drag_root_x, sidebar->drag_root_y,
Comment 6 Carlos Soriano 2015-07-07 14:49:14 UTC
(In reply to Matthias Clasen from comment #5)
> This seems to fix it for me. Not sure why that line was there - Carlos ?
> 
> diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
> index a591ea5..322b7f1 100644
> --- a/gtk/gtkplacessidebar.c
> +++ b/gtk/gtkplacessidebar.c
> @@ -1456,11 +1456,7 @@ on_motion_notify_event (GtkWidget      *widget,
>      return FALSE;
>  
>    if (!(event->state & GDK_BUTTON1_MASK))
> -    {
> -      sidebar->drag_row = NULL;
> -
> -      return FALSE;
> -    }
> +    return FALSE;
>  
>    if (gtk_drag_check_threshold (widget,
>                                  sidebar->drag_root_x, sidebar->drag_root_y,

Whops, a behavioural copy paste error. Please go ahead.