[mutter/wip/carlosg/input-thread: 87/96] clutter: Drop clutter_event_peek()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/input-thread: 87/96] clutter: Drop clutter_event_peek()
- Date: Tue, 6 Oct 2020 15:50:45 +0000 (UTC)
commit 3e1e91ec8f799a93bf46a5c6c189edfbe24b3b37
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Aug 11 18:58:15 2020 +0200
clutter: Drop clutter_event_peek()
Peeking doesn't seem such a good idea when we switch to async queues.
Luckily nobody seems to be using this.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403
clutter/clutter/clutter-event.c | 26 --------------------------
clutter/clutter/clutter-event.h | 2 --
2 files changed, 28 deletions(-)
---
diff --git a/clutter/clutter/clutter-event.c b/clutter/clutter/clutter-event.c
index 87788acad8..75eee81df8 100644
--- a/clutter/clutter/clutter-event.c
+++ b/clutter/clutter/clutter-event.c
@@ -1535,32 +1535,6 @@ clutter_event_get (void)
return g_queue_pop_tail (context->events_queue);
}
-/**
- * clutter_event_peek:
- *
- * Returns a pointer to the first event from the event queue but
- * does not remove it.
- *
- * Return value: (transfer none): A #ClutterEvent or NULL if queue empty.
- *
- * Since: 0.4
- */
-ClutterEvent *
-clutter_event_peek (void)
-{
- ClutterMainContext *context = _clutter_context_get_default ();
-
- g_return_val_if_fail (context != NULL, NULL);
-
- if (context->events_queue == NULL)
- return NULL;
-
- if (g_queue_is_empty (context->events_queue))
- return NULL;
-
- return g_queue_peek_tail (context->events_queue);
-}
-
void
_clutter_event_push (const ClutterEvent *event,
gboolean do_copy)
diff --git a/clutter/clutter/clutter-event.h b/clutter/clutter/clutter-event.h
index 0f65c2adc1..69484285c6 100644
--- a/clutter/clutter/clutter-event.h
+++ b/clutter/clutter/clutter-event.h
@@ -629,8 +629,6 @@ gboolean clutter_events_pending (void);
CLUTTER_EXPORT
ClutterEvent * clutter_event_get (void);
CLUTTER_EXPORT
-ClutterEvent * clutter_event_peek (void);
-CLUTTER_EXPORT
void clutter_event_put (const ClutterEvent *event);
CLUTTER_EXPORT
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]