mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +00:00
display: Stop using gdk_event_copy
Events are effectively readonly in GDK now, so we can just take a reference, no need for a copy.
This commit is contained in:
parent
fe21223d48
commit
59cc216985
@ -89,8 +89,6 @@ enum {
|
||||
|
||||
static void gdk_display_dispose (GObject *object);
|
||||
static void gdk_display_finalize (GObject *object);
|
||||
static void gdk_display_put_event_nocopy (GdkDisplay *display,
|
||||
GdkEvent *event);
|
||||
|
||||
|
||||
static GdkAppLaunchContext *gdk_display_real_get_app_launch_context (GdkDisplay *display);
|
||||
@ -476,19 +474,12 @@ gdk_display_peek_event (GdkDisplay *display)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_display_put_event_nocopy (GdkDisplay *display,
|
||||
GdkEvent *event)
|
||||
{
|
||||
_gdk_event_queue_append (display, event);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_display_put_event:
|
||||
* @display: a #GdkDisplay
|
||||
* @event: a #GdkEvent.
|
||||
* @event (transfer none): a #GdkEvent.
|
||||
*
|
||||
* Appends a copy of the given event onto the front of the event
|
||||
* Appends the given event onto the front of the event
|
||||
* queue for @display.
|
||||
**/
|
||||
void
|
||||
@ -498,7 +489,7 @@ gdk_display_put_event (GdkDisplay *display,
|
||||
g_return_if_fail (GDK_IS_DISPLAY (display));
|
||||
g_return_if_fail (event != NULL);
|
||||
|
||||
gdk_display_put_event_nocopy (display, gdk_event_copy (event));
|
||||
_gdk_event_queue_append (display, g_object_ref ((GdkEvent *)event));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -520,7 +511,7 @@ generate_grab_broken_event (GdkDisplay *display,
|
||||
grab_surface,
|
||||
implicit);
|
||||
|
||||
gdk_display_put_event_nocopy (display, event);
|
||||
_gdk_event_queue_append (display, event);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user