Add a drag_data_received handler for the label.
Tue Jan 12 18:30:51 1999 Owen Taylor <otaylor@redhat.com> * gtk/testdnd.c (label_drag_data_received): Add a drag_data_received handler for the label. Tue Jan 12 15:01:50 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.c: Removed the putback_events queue, since it was causing problems with event ordering - just keep a single queue. If we need it, we can add priorities to events. * gdk/gdkevents.c: Annotate events with flags - we allocate a GdkEventPrivate structure in gdk_event_new() and use these flags to mark an event being translated as "pending" - I.e., not yet ready to be dequeued. So we can put the event on the queue and get the order of the events right. (This solves the double-click problems) * gdk/gdk.h gdk/gdkevents.h: Add gdk_event_peek() to get a copy of the next event on the event queue. * gtk/gtkmain.c (gtk_main_do_event): Use gdk_event_peek() to check the next event without causing event queue reordering.
This commit is contained in:
@ -553,7 +553,7 @@ gtk_main_do_event (GdkEvent *event)
|
||||
|
||||
/* If there are any events pending then get the next one.
|
||||
*/
|
||||
next_event = gdk_event_get ();
|
||||
next_event = gdk_event_peek ();
|
||||
|
||||
/* Try to compress enter/leave notify events. These event
|
||||
* pairs occur when the mouse is dragged quickly across
|
||||
@ -571,19 +571,17 @@ gtk_main_do_event (GdkEvent *event)
|
||||
(next_event->type != event->type) &&
|
||||
(next_event->any.window == event->any.window))
|
||||
{
|
||||
/* Throw both the peeked copy and the queued copy away
|
||||
*/
|
||||
gdk_event_free (next_event);
|
||||
next_event = gdk_event_get ();
|
||||
gdk_event_free (next_event);
|
||||
next_event = NULL;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (next_event)
|
||||
{
|
||||
gdk_event_put (next_event);
|
||||
gdk_event_free (next_event);
|
||||
next_event = NULL;
|
||||
}
|
||||
gdk_event_free (next_event);
|
||||
|
||||
/* Find the widget which got the event. We store the widget
|
||||
* in the user_data field of GdkWindow's.
|
||||
|
||||
Reference in New Issue
Block a user