[evolution] [EMinicard] Release grab when started drag of the contact



commit 65dc737f06fe7fa37b19f54e88a769a14a4ebebe
Author: Milan Crha <mcrha redhat com>
Date:   Thu Feb 11 19:48:49 2016 +0100

    [EMinicard] Release grab when started drag of the contact
    
    As discussed in bug #760951, drag & drop from the minicard view
    into the source selector results in a state where there cannot be
    clicked anything, but the minicard view again. That was due to left
    grab on the minicard view canvas, while it should be released,
    the same as it is released on button release in other cases.

 addressbook/gui/widgets/e-minicard.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index 6edc597..e37eb6f 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -625,7 +625,15 @@ e_minicard_event (GnomeCanvasItem *item,
 
                                ret_val = e_minicard_drag_begin (e_minicard, event);
 
+                               if (gtk_widget_has_grab (GTK_WIDGET (GNOME_CANVAS_ITEM 
(e_minicard)->canvas))) {
+                                       gtk_grab_remove (GTK_WIDGET (GNOME_CANVAS_ITEM (e_minicard)->canvas));
+                                       gnome_canvas_item_ungrab (GNOME_CANVAS_ITEM (e_minicard), 
event->motion.time);
+                               }
+
+                               e_minicard->drag_button = 0;
                                e_minicard->drag_button_down = FALSE;
+                               e_minicard->button_x = -1;
+                               e_minicard->button_y = -1;
 
                                return ret_val;
                        }


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