[gtk+] gdk: Make gdk_display_peek_event() Return a reference to the event
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: Make gdk_display_peek_event() Return a reference to the event
- Date: Thu, 14 Dec 2017 00:09:27 +0000 (UTC)
commit 2f65a2f5cc6252486f79425d2a0f7ba4ce95160d
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Oct 31 15:40:16 2017 +0100
gdk: Make gdk_display_peek_event() Return a reference to the event
No need to copy it.
gdk/gdkdisplay.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index bd43125..0e6baee 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -481,7 +481,7 @@ gdk_display_get_event (GdkDisplay *display)
*
* Returns: (nullable): a copy of the first #GdkEvent on the event
* queue, or %NULL if no events are in the queue. The returned
- * #GdkEvent should be freed with gdk_event_free().
+ * #GdkEvent should be freed with g_object_unref().
*
* Since: 2.2
**/
@@ -495,7 +495,7 @@ gdk_display_peek_event (GdkDisplay *display)
tmp_list = _gdk_event_queue_find_first (display);
if (tmp_list)
- return gdk_event_copy (tmp_list->data);
+ return g_object_ref (tmp_list->data);
else
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]