aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-09-07 12:40:06 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-09-07 12:40:06 +0800
commit1aef3474d900af3ae6890f02232f16129514e896 (patch)
tree0f56ed7996e8756d6e9edd26837628af76805c82 /e-util
parent861e4d421cb94007f9448a61c8e8865fa28d6446 (diff)
downloadgsoc2013-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 'e-util')
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-canvas.c20
2 files changed, 13 insertions, 12 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index c1eccd6f0f..e17f53ff4b 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,8 @@
+2000-09-07 Federico Mena Quintero <federico@helixcode.com>
+
+ * e-canvas.c (emit_event): Remove incorrect optimization. Events
+ are read-only!
+
2000-09-04 Lauris Kaplinski <lauris@helixcode.com>
* e-unicode.c: Added new font code, but comment it out now
diff --git a/e-util/e-canvas.c b/e-util/e-canvas.c
index fb67bf0379..83f276e1f6 100644
--- a/e-util/e-canvas.c
+++ b/e-util/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))