[mutter/wip/carlosg/grabs-pt2: 63/68] clutter: Drop clutter_stage_[gs]et_throttle_motion_events()




commit 1d9e9b66d0ef5b92da0ae9b50ae922979bbeafd3
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Nov 4 22:28:28 2021 +0100

    clutter: Drop clutter_stage_[gs]et_throttle_motion_events()
    
    This setting stays at the default and is left untouched, drop this
    external switch on event handling internals.

 clutter/clutter/clutter-stage.c | 54 +----------------------------------------
 clutter/clutter/clutter-stage.h |  5 ----
 2 files changed, 1 insertion(+), 58 deletions(-)
---
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index bb299296ac..2d03b1976e 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -133,7 +133,6 @@ struct _ClutterStagePrivate
   GHashTable *pointer_devices;
   GHashTable *touch_sequences;
 
-  guint throttle_motion_events : 1;
   guint actor_needs_immediate_relayout : 1;
 };
 
@@ -708,7 +707,7 @@ _clutter_stage_process_queued_events (ClutterStage *stage)
         check_device = TRUE;
 
       /* Skip consecutive motion events coming from the same device. */
-      if (priv->throttle_motion_events && next_event != NULL)
+      if (next_event != NULL)
         {
           if (event->type == CLUTTER_MOTION &&
               (next_event->type == CLUTTER_MOTION ||
@@ -1548,8 +1547,6 @@ clutter_stage_init (ClutterStage *self)
 
   priv->event_queue = g_queue_new ();
 
-  priv->throttle_motion_events = TRUE;
-
   priv->pointer_devices =
     g_hash_table_new_full (NULL, NULL,
                            NULL, (GDestroyNotify) free_pointer_device_entry);
@@ -2409,55 +2406,6 @@ _clutter_stage_get_default_window (void)
   return _clutter_stage_get_window (stage);
 }
 
-/**
- * clutter_stage_set_throttle_motion_events:
- * @stage: a #ClutterStage
- * @throttle: %TRUE to throttle motion events
- *
- * Sets whether motion events received between redraws should
- * be throttled or not. If motion events are throttled, those
- * events received by the windowing system between redraws will
- * be compressed so that only the last event will be propagated
- * to the @stage and its actors.
- *
- * This function should only be used if you want to have all
- * the motion events delivered to your application code.
- *
- * Since: 1.0
- */
-void
-clutter_stage_set_throttle_motion_events (ClutterStage *stage,
-                                          gboolean      throttle)
-{
-  ClutterStagePrivate *priv;
-
-  g_return_if_fail (CLUTTER_IS_STAGE (stage));
-
-  priv = stage->priv;
-
-  if (priv->throttle_motion_events != throttle)
-    priv->throttle_motion_events = throttle;
-}
-
-/**
- * clutter_stage_get_throttle_motion_events:
- * @stage: a #ClutterStage
- *
- * Retrieves the value set with clutter_stage_set_throttle_motion_events()
- *
- * Return value: %TRUE if the motion events are being throttled,
- *   and %FALSE otherwise
- *
- * Since: 1.0
- */
-gboolean
-clutter_stage_get_throttle_motion_events (ClutterStage *stage)
-{
-  g_return_val_if_fail (CLUTTER_IS_STAGE (stage), FALSE);
-
-  return stage->priv->throttle_motion_events;
-}
-
 /**
  * clutter_stage_schedule_update:
  * @stage: a #ClutterStage actor
diff --git a/clutter/clutter/clutter-stage.h b/clutter/clutter/clutter-stage.h
index 80c709e530..6c1f5ff961 100644
--- a/clutter/clutter/clutter-stage.h
+++ b/clutter/clutter/clutter-stage.h
@@ -188,11 +188,6 @@ void            clutter_stage_set_key_focus                     (ClutterStage
                                                                  ClutterActor          *actor);
 CLUTTER_EXPORT
 ClutterActor *  clutter_stage_get_key_focus                     (ClutterStage          *stage);
-CLUTTER_EXPORT
-void            clutter_stage_set_throttle_motion_events        (ClutterStage          *stage,
-                                                                 gboolean               throttle);
-CLUTTER_EXPORT
-gboolean        clutter_stage_get_throttle_motion_events        (ClutterStage          *stage);
 
 CLUTTER_EXPORT
 ClutterActor *  clutter_stage_get_actor_at_pos                  (ClutterStage          *stage,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]