[mutter/wip/carlosg/sanitize-gestures: 1/14] clutter: Drop default action of Pan action
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/sanitize-gestures: 1/14] clutter: Drop default action of Pan action
- Date: Mon, 27 Sep 2021 19:59:12 +0000 (UTC)
commit 1375c078dd91b5cca620027e7e7728089385c58f
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Jun 18 16:36:25 2021 +0200
clutter: Drop default action of Pan action
By default, the pan action performs matrix translations on the
child widget. Nobody wants that (or, nobody want's *just* that).
It's cleaner not to mix mechanism and effect in ClutterGestureAction
subclasses, so drop this base implementation, and change the signal
accumulator so it's more similar to event signals (not that it's
used any longer, anyway).
clutter/clutter/clutter-pan-action.c | 24 +-----------------------
clutter/clutter/clutter-pan-action.h | 3 ---
2 files changed, 1 insertion(+), 26 deletions(-)
---
diff --git a/clutter/clutter/clutter-pan-action.c b/clutter/clutter/clutter-pan-action.c
index 5ad82ff6f5..5521121ce0 100644
--- a/clutter/clutter/clutter-pan-action.c
+++ b/clutter/clutter/clutter-pan-action.c
@@ -348,25 +348,6 @@ gesture_end (ClutterGestureAction *gesture,
}
}
-static gboolean
-clutter_pan_action_real_pan (ClutterPanAction *self,
- ClutterActor *actor,
- gboolean is_interpolated)
-{
- gfloat dx, dy;
- graphene_matrix_t transform;
- graphene_matrix_t translate;
-
- clutter_pan_action_get_constrained_motion_delta (self, 0, &dx, &dy);
-
- clutter_actor_get_child_transform (actor, &transform);
- graphene_matrix_init_translate (&translate,
- &GRAPHENE_POINT3D_INIT (dx, dy, 0.0f));
- graphene_matrix_multiply (&translate, &transform, &transform);
- clutter_actor_set_child_transform (actor, &transform);
- return TRUE;
-}
-
static void
clutter_pan_action_set_property (GObject *gobject,
guint prop_id,
@@ -483,8 +464,6 @@ clutter_pan_action_class_init (ClutterPanActionClass *klass)
ClutterGestureActionClass *gesture_class =
CLUTTER_GESTURE_ACTION_CLASS (klass);
- klass->pan = clutter_pan_action_real_pan;
-
gesture_class->gesture_prepare = gesture_prepare;
gesture_class->gesture_begin = gesture_begin;
gesture_class->gesture_progress = gesture_progress;
@@ -586,8 +565,7 @@ clutter_pan_action_class_init (ClutterPanActionClass *klass)
g_signal_new (I_("pan"),
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ClutterPanActionClass, pan),
- _clutter_boolean_continue_accumulator, NULL,
+ 0, g_signal_accumulator_true_handled, NULL,
_clutter_marshal_BOOLEAN__OBJECT_BOOLEAN,
G_TYPE_BOOLEAN, 2,
CLUTTER_TYPE_ACTOR,
diff --git a/clutter/clutter/clutter-pan-action.h b/clutter/clutter/clutter-pan-action.h
index 64115b69bc..c740147922 100644
--- a/clutter/clutter/clutter-pan-action.h
+++ b/clutter/clutter/clutter-pan-action.h
@@ -84,9 +84,6 @@ struct _ClutterPanActionClass
ClutterGestureActionClass parent_class;
/*< public >*/
- gboolean (* pan) (ClutterPanAction *action,
- ClutterActor *actor,
- gboolean is_interpolated);
void (* pan_stopped) (ClutterPanAction *action,
ClutterActor *actor);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]