From 5b16953a2f6d7fbd6e0c62b8bb793afae0f59de2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Tue, 20 Jan 2015 07:41:04 +0100
Subject: [PATCH] Fix drag and drop
GTK+ 3 started sending leave notifications upon starting a DND operation.
---
liblogdiag/ld-category-symbol-view.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/liblogdiag/ld-category-symbol-view.c b/liblogdiag/ld-category-symbol-view.c
index 4b19ca0..84f9c22 100644
--- a/liblogdiag/ld-category-symbol-view.c
+++ b/liblogdiag/ld-category-symbol-view.c
@@ -425,7 +425,15 @@ on_motion_notify (GtkWidget *widget, GdkEventMotion *event, gpointer user_data)
static gboolean
on_leave_notify (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
{
- symbol_deselect (LD_CATEGORY_SYMBOL_VIEW (widget));
+ switch (event->mode)
+ {
+ case GDK_CROSSING_GRAB:
+ case GDK_CROSSING_GTK_GRAB:
+ case GDK_CROSSING_STATE_CHANGED:
+ break;
+ default:
+ symbol_deselect (LD_CATEGORY_SYMBOL_VIEW (widget));
+ }
return FALSE;
}