diff options
author | Milan Crha <mcrha@redhat.com> | 2016-02-11 19:48:49 +0100 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2016-02-11 19:53:23 +0100 |
commit | 34b9382598f06cf46d804d07cd0456f15911f360 (patch) | |
tree | be7c436e7d8d91e98a665375332e1f7b4f97f867 | |
parent | 7eb0a928d96227c8be7a567f42874abc44e129e8 (diff) | |
download | evolution-34b9382598f06cf46d804d07cd0456f15911f360.tar.gz |
[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.
-rw-r--r-- | 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 6edc597bcb..e37eb6fdd9 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; } |