aboutsummaryrefslogtreecommitdiffstats
path: root/libgnomecanvas
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-07-11 00:18:15 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-07-11 00:28:29 +0800
commit830102ae9fef49bf5f97bae503b069d7731be712 (patch)
tree5db75affe980066edca8db987ff6e35b1c8b8c38 /libgnomecanvas
parent4bae40b6d675e0dcb11d55454de64ec393e6ee1a (diff)
downloadgsoc2013-evolution-830102ae9fef49bf5f97bae503b069d7731be712.tar
gsoc2013-evolution-830102ae9fef49bf5f97bae503b069d7731be712.tar.gz
gsoc2013-evolution-830102ae9fef49bf5f97bae503b069d7731be712.tar.bz2
gsoc2013-evolution-830102ae9fef49bf5f97bae503b069d7731be712.tar.lz
gsoc2013-evolution-830102ae9fef49bf5f97bae503b069d7731be712.tar.xz
gsoc2013-evolution-830102ae9fef49bf5f97bae503b069d7731be712.tar.zst
gsoc2013-evolution-830102ae9fef49bf5f97bae503b069d7731be712.zip
Bug 652629 - GnomeCanvas: Disregard synthesized crossing events
synth_crossing() in gtkwidget.c does not set valid pointer coordinates, but GnomeCanvas relies on these coordinates to figure out what canvas item the event applies to. Detect these synthesized GDK_ENTER_NOTIFY and GDK_LEAVE_NOTIFY events and disregard them. This was breaking drag-and-drop of EMinicards and probably elsewhere.
Diffstat (limited to 'libgnomecanvas')
-rw-r--r--libgnomecanvas/gnome-canvas.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libgnomecanvas/gnome-canvas.c b/libgnomecanvas/gnome-canvas.c
index a0ad066f44..cca3df0e56 100644
--- a/libgnomecanvas/gnome-canvas.c
+++ b/libgnomecanvas/gnome-canvas.c
@@ -2736,6 +2736,13 @@ gnome_canvas_crossing (GtkWidget *widget, GdkEventCrossing *event)
if (event->window != bin_window)
return FALSE;
+ /* XXX Detect and disregard synthesized crossing events generated
+ * by synth_crossing() in gtkwidget.c. The pointer coordinates
+ * are invalid and pick_current_item() relies on them. */
+ if (event->x == 0 && event->y == 0 &&
+ event->x_root == 0 && event->y_root == 0)
+ return FALSE;
+
canvas->state = event->state;
return pick_current_item (canvas, (GdkEvent *) event);
}