forked from AuroraMiddleware/gtk
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
This commit is contained in:
parent
52601eae08
commit
234d762ec3
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
||||
Tue Jan 5 19:01:18 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_init): Push
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
||||
Tue Jan 5 19:01:18 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_init): Push
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
||||
Tue Jan 5 19:01:18 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_init): Push
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
||||
Tue Jan 5 19:01:18 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_init): Push
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
||||
Tue Jan 5 19:01:18 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_init): Push
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
||||
Tue Jan 5 19:01:18 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_init): Push
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
||||
Tue Jan 5 19:01:18 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_init): Push
|
||||
|
@ -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
|
||||
|
@ -355,6 +355,7 @@ gtk_menu_popup (GtkMenu *menu,
|
||||
if ((current_event->type != GDK_BUTTON_PRESS) &&
|
||||
(current_event->type != GDK_ENTER_NOTIFY))
|
||||
menu_shell->ignore_enter = TRUE;
|
||||
gdk_event_free(current_event);
|
||||
}
|
||||
|
||||
if (menu->torn_off)
|
||||
|
@ -545,6 +545,7 @@ gtk_real_menu_item_select (GtkItem *item)
|
||||
menu_item);
|
||||
else
|
||||
gtk_menu_item_select_timeout (menu_item);
|
||||
if(event) gdk_event_free(event);
|
||||
}
|
||||
|
||||
gtk_widget_set_state (GTK_WIDGET (menu_item), GTK_STATE_PRELIGHT);
|
||||
@ -577,6 +578,7 @@ gtk_real_menu_item_deselect (GtkItem *item)
|
||||
etime = event ? gdk_event_get_time (event) : GDK_CURRENT_TIME;
|
||||
if (etime > last_submenu_deselect_time)
|
||||
last_submenu_deselect_time = etime;
|
||||
if(event) gdk_event_free(event);
|
||||
}
|
||||
|
||||
gtk_widget_set_state (GTK_WIDGET (menu_item), GTK_STATE_NORMAL);
|
||||
|
Loading…
Reference in New Issue
Block a user