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




commit 3b6c245ec10cfda789f876cc3892af35131e7d7f
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 24363d9240..886ab94a3c 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -131,7 +131,6 @@ struct _ClutterStagePrivate
   GHashTable *pointer_devices;
   GHashTable *touch_sequences;
 
-  guint throttle_motion_events : 1;
   guint actor_needs_immediate_relayout : 1;
 };
 
@@ -712,7 +711,7 @@ _clutter_stage_process_queued_events (ClutterStage *stage)
        * except those of tablet tools, since users of these events
        * want no precision loss.
        */
-      if (priv->throttle_motion_events && next_event != NULL &&
+      if (next_event != NULL &&
           device_type != CLUTTER_TABLET_DEVICE &&
           device_type != CLUTTER_PEN_DEVICE &&
           device_type != CLUTTER_ERASER_DEVICE)
@@ -1555,8 +1554,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);
@@ -2416,55 +2413,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 814e52fc37..6253dfd49b 100644
--- a/clutter/clutter/clutter-stage.h
+++ b/clutter/clutter/clutter-stage.h
@@ -187,11 +187,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]