mirror of
https://github.com/brl/mutter.git
synced 2025-01-27 03:49:03 +00:00
clutter: Defer repick on transform changes
Avoid an immediate repick, and queue it instead so it happens for all devices on the next frame clock step. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3385>
This commit is contained in:
parent
c1feb2dc40
commit
9f00572762
@ -960,7 +960,7 @@ static void push_in_paint_unmapped_branch (ClutterActor *self,
|
||||
static void pop_in_paint_unmapped_branch (ClutterActor *self,
|
||||
guint count);
|
||||
|
||||
static void clutter_actor_update_pointer (ClutterActor *self);
|
||||
static void clutter_actor_update_devices (ClutterActor *self);
|
||||
|
||||
static GQuark quark_actor_layout_info = 0;
|
||||
static GQuark quark_actor_transform_info = 0;
|
||||
@ -2404,7 +2404,7 @@ update_pointer_if_not_animated (ClutterActor *actor)
|
||||
{
|
||||
if (!clutter_actor_has_transitions (actor) &&
|
||||
!CLUTTER_ACTOR_IN_RELAYOUT (actor))
|
||||
clutter_actor_update_pointer (actor);
|
||||
clutter_actor_update_devices (actor);
|
||||
}
|
||||
|
||||
/*< private >
|
||||
@ -12236,19 +12236,13 @@ clutter_actor_set_animatable_property (ClutterActor *actor,
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_actor_update_pointer (ClutterActor *self)
|
||||
clutter_actor_update_devices (ClutterActor *self)
|
||||
{
|
||||
ClutterInputDevice *pointer;
|
||||
ClutterStage *stage;
|
||||
ClutterSeat *seat;
|
||||
|
||||
stage = CLUTTER_STAGE (_clutter_actor_get_stage_internal (self));
|
||||
if (!stage)
|
||||
return;
|
||||
|
||||
seat = clutter_backend_get_default_seat (clutter_get_default_backend ());
|
||||
pointer = clutter_seat_get_pointer (seat);
|
||||
clutter_stage_repick_device (stage, pointer);
|
||||
if (stage)
|
||||
clutter_stage_invalidate_devices (stage);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -12301,7 +12295,7 @@ clutter_actor_set_final_state (ClutterAnimatable *animatable,
|
||||
}
|
||||
}
|
||||
|
||||
clutter_actor_update_pointer (actor);
|
||||
clutter_actor_update_devices (actor);
|
||||
|
||||
g_free (p_name);
|
||||
}
|
||||
|
@ -168,4 +168,6 @@ ClutterGrab * clutter_stage_grab_input_only (ClutterStage *self,
|
||||
gpointer user_data,
|
||||
GDestroyNotify user_data_destroy);
|
||||
|
||||
void clutter_stage_invalidate_devices (ClutterStage *stage);
|
||||
|
||||
G_END_DECLS
|
||||
|
@ -840,8 +840,8 @@ clutter_stage_dequeue_actor_relayout (ClutterStage *stage,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_stage_invalidate_views_devices (ClutterStage *stage)
|
||||
void
|
||||
clutter_stage_invalidate_devices (ClutterStage *stage)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
@ -900,7 +900,7 @@ clutter_stage_maybe_relayout (ClutterActor *actor)
|
||||
CLUTTER_NOTE (ACTOR, "<<< Completed recomputing layout of %d subtrees", count);
|
||||
|
||||
if (count)
|
||||
clutter_stage_invalidate_views_devices (stage);
|
||||
clutter_stage_invalidate_devices (stage);
|
||||
}
|
||||
|
||||
GSList *
|
||||
|
Loading…
x
Reference in New Issue
Block a user