summaryrefslogtreecommitdiff
path: root/gtk/gtkeditable.c
diff options
context:
space:
mode:
authorGeorge Lebl <jirka@5z.com>1999-01-06 05:19:15 +0000
committerGeorge Lebl <jirka@src.gnome.org>1999-01-06 05:19:15 +0000
commit234d762ec3b66191f5178d0c6a39fab01ea68506 (patch)
treed55a0f14423ce472aa3c4525f661030e90772027 /gtk/gtkeditable.c
parent52601eae08db7abbebf5aea50727b887bc49b700 (diff)
downloadgdk-pixbuf-234d762ec3b66191f5178d0c6a39fab01ea68506.tar.gz
free the event that was returned to us by gtk_get_current_event
Tue Jan 05 21:18:00 1999 George Lebl <jirka@5z.com> * gtk/gtkmenu.c,gtk/gtkmenuitem.c,gtk/gtkeditable.c: free the event that was returned to us by gtk_get_current_event
Diffstat (limited to 'gtk/gtkeditable.c')
-rw-r--r--gtk/gtkeditable.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/gtk/gtkeditable.c b/gtk/gtkeditable.c
index dbd78d636..ad97401cf 100644
--- a/gtk/gtkeditable.c
+++ b/gtk/gtkeditable.c
@@ -776,6 +776,7 @@ static guint32
gtk_editable_get_event_time (GtkEditable *editable)
{
GdkEvent *event;
+ guint32 tm = GDK_CURRENT_TIME;
event = gtk_get_current_event();
@@ -783,32 +784,33 @@ gtk_editable_get_event_time (GtkEditable *editable)
switch (event->type)
{
case GDK_MOTION_NOTIFY:
- return event->motion.time;
+ tm = event->motion.time; break;
case GDK_BUTTON_PRESS:
case GDK_2BUTTON_PRESS:
case GDK_3BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
- return event->button.time;
+ tm = event->button.time; break;
case GDK_KEY_PRESS:
case GDK_KEY_RELEASE:
- return event->key.time;
+ tm = event->key.time; break;
case GDK_ENTER_NOTIFY:
case GDK_LEAVE_NOTIFY:
- return event->crossing.time;
+ tm = event->crossing.time; break;
case GDK_PROPERTY_NOTIFY:
- return event->property.time;
+ tm = event->property.time; break;
case GDK_SELECTION_CLEAR:
case GDK_SELECTION_REQUEST:
case GDK_SELECTION_NOTIFY:
- return event->selection.time;
+ tm = event->selection.time; break;
case GDK_PROXIMITY_IN:
case GDK_PROXIMITY_OUT:
- return event->proximity.time;
+ tm = event->proximity.time; break;
default: /* use current time */
break;
}
+ gdk_event_free(event);
- return GDK_CURRENT_TIME;
+ return tm;
}
void