diff options
author | Federico Mena Quintero <federico@helixcode.com> | 2000-09-07 12:40:06 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2000-09-07 12:40:06 +0800 |
commit | 1aef3474d900af3ae6890f02232f16129514e896 (patch) | |
tree | 0f56ed7996e8756d6e9edd26837628af76805c82 /widgets | |
parent | 861e4d421cb94007f9448a61c8e8865fa28d6446 (diff) | |
download | gsoc2013-evolution-1aef3474d900af3ae6890f02232f16129514e896.tar.gz gsoc2013-evolution-1aef3474d900af3ae6890f02232f16129514e896.tar.zst gsoc2013-evolution-1aef3474d900af3ae6890f02232f16129514e896.zip |
Remove incorrect optimization. Events are read-only!
2000-09-07 Federico Mena Quintero <federico@helixcode.com>
* e-canvas.c (emit_event): Remove incorrect optimization. Events
are read-only!
svn path=/trunk/; revision=5228
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/misc/e-canvas.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c index fb67bf0379..83f276e1f6 100644 --- a/widgets/misc/e-canvas.c +++ b/widgets/misc/e-canvas.c @@ -149,7 +149,7 @@ is_descendant (GnomeCanvasItem *item, GnomeCanvasItem *parent) static int emit_event (GnomeCanvas *canvas, GdkEvent *event) { - /*GdkEvent ev;*/ + GdkEvent ev; gint finished; GnomeCanvasItem *item; GnomeCanvasItem *parent; @@ -205,16 +205,14 @@ emit_event (GnomeCanvas *canvas, GdkEvent *event) * offsets of the fields in the event structures. */ - /*ev = *event;*/ + ev = *event; - switch (event->type) { + switch (ev.type) { case GDK_ENTER_NOTIFY: case GDK_LEAVE_NOTIFY: gnome_canvas_window_to_world (canvas, - event->crossing.x, - event->crossing.y, - &(event->crossing.x), - &(event->crossing.y)); + ev.crossing.x, ev.crossing.y, + &ev.crossing.x, &ev.crossing.y); break; case GDK_MOTION_NOTIFY: @@ -223,10 +221,8 @@ emit_event (GnomeCanvas *canvas, GdkEvent *event) case GDK_3BUTTON_PRESS: case GDK_BUTTON_RELEASE: gnome_canvas_window_to_world (canvas, - event->motion.x, - event->motion.y, - &(event->motion.x), - &(event->motion.y)); + ev.motion.x, ev.motion.y, + &ev.motion.x, &ev.motion.y); break; default: @@ -252,7 +248,7 @@ emit_event (GnomeCanvas *canvas, GdkEvent *event) gtk_object_ref (GTK_OBJECT (item)); gtk_signal_emit_by_name (GTK_OBJECT (item), "event", - event, + &ev, &finished); if (GTK_OBJECT_DESTROYED (item)) |