[mutter/wip/carlosg/input-refactors-pt1: 17/28] clutter: Pass stage on to _clutter_input_device_set_actor()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/input-refactors-pt1: 17/28] clutter: Pass stage on to _clutter_input_device_set_actor()
- Date: Fri, 23 Oct 2020 16:26:32 +0000 (UTC)
commit 80c2e86198fcd6d0c9d1ef8e448d0d2a9b9ec1a2
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Jun 5 15:48:57 2020 +0200
clutter: Pass stage on to _clutter_input_device_set_actor()
Don't rely on the device stage, so specify the stage in the callers.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1486
clutter/clutter/clutter-input-device-private.h | 1 +
clutter/clutter/clutter-input-device.c | 10 +++++++---
2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/clutter/clutter/clutter-input-device-private.h b/clutter/clutter/clutter-input-device-private.h
index ed4c48073d..11e0c7f63f 100644
--- a/clutter/clutter/clutter-input-device-private.h
+++ b/clutter/clutter/clutter-input-device-private.h
@@ -196,6 +196,7 @@ void _clutter_input_device_set_time (ClutterInputDevice *device,
guint32 time_);
void _clutter_input_device_set_actor (ClutterInputDevice *device,
ClutterEventSequence *sequence,
+ ClutterStage *stage,
ClutterActor *actor,
gboolean emit_crossing);
CLUTTER_EXPORT
diff --git a/clutter/clutter/clutter-input-device.c b/clutter/clutter/clutter-input-device.c
index 5f6ad11888..6f4f9d4f32 100644
--- a/clutter/clutter/clutter-input-device.c
+++ b/clutter/clutter/clutter-input-device.c
@@ -781,6 +781,7 @@ on_cursor_actor_reactive_changed (ClutterActor *actor,
void
_clutter_input_device_set_actor (ClutterInputDevice *device,
ClutterEventSequence *sequence,
+ ClutterStage *stage,
ClutterActor *actor,
gboolean emit_crossing)
{
@@ -800,7 +801,7 @@ _clutter_input_device_set_actor (ClutterInputDevice *device,
event = clutter_event_new (CLUTTER_LEAVE);
event->crossing.time = device->current_time;
event->crossing.flags = 0;
- event->crossing.stage = device->stage;
+ event->crossing.stage = stage;
event->crossing.source = old_actor;
event->crossing.x = device->current_x;
event->crossing.y = device->current_y;
@@ -837,7 +838,7 @@ _clutter_input_device_set_actor (ClutterInputDevice *device,
event = clutter_event_new (CLUTTER_ENTER);
event->crossing.time = device->current_time;
event->crossing.flags = 0;
- event->crossing.stage = device->stage;
+ event->crossing.stage = stage;
event->crossing.x = device->current_x;
event->crossing.y = device->current_y;
event->crossing.source = actor;
@@ -1038,6 +1039,7 @@ clutter_input_device_update (ClutterInputDevice *device,
return old_cursor_actor;
_clutter_input_device_set_actor (device, sequence,
+ stage,
new_cursor_actor,
emit_crossing);
@@ -1667,12 +1669,14 @@ _clutter_input_device_remove_event_sequence (ClutterInputDevice *device,
{
GList *sequences =
g_hash_table_lookup (device->inv_touch_sequence_actors, info->actor);
+ ClutterStage *stage =
+ CLUTTER_STAGE (clutter_actor_get_stage (info->actor));
sequences = g_list_remove (sequences, sequence);
g_hash_table_replace (device->inv_touch_sequence_actors,
info->actor, sequences);
- _clutter_input_device_set_actor (device, sequence, NULL, TRUE);
+ _clutter_input_device_set_actor (device, sequence, stage, NULL, TRUE);
}
g_hash_table_remove (device->touch_sequences_info, sequence);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]