mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
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
This commit is contained in:
parent
6a6894a397
commit
f99fc2ae9c
@ -196,6 +196,7 @@ void _clutter_input_device_set_time (ClutterInputDevice *device,
|
|||||||
guint32 time_);
|
guint32 time_);
|
||||||
void _clutter_input_device_set_actor (ClutterInputDevice *device,
|
void _clutter_input_device_set_actor (ClutterInputDevice *device,
|
||||||
ClutterEventSequence *sequence,
|
ClutterEventSequence *sequence,
|
||||||
|
ClutterStage *stage,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
gboolean emit_crossing);
|
gboolean emit_crossing);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
|
@ -781,6 +781,7 @@ on_cursor_actor_reactive_changed (ClutterActor *actor,
|
|||||||
void
|
void
|
||||||
_clutter_input_device_set_actor (ClutterInputDevice *device,
|
_clutter_input_device_set_actor (ClutterInputDevice *device,
|
||||||
ClutterEventSequence *sequence,
|
ClutterEventSequence *sequence,
|
||||||
|
ClutterStage *stage,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
gboolean emit_crossing)
|
gboolean emit_crossing)
|
||||||
{
|
{
|
||||||
@ -800,7 +801,7 @@ _clutter_input_device_set_actor (ClutterInputDevice *device,
|
|||||||
event = clutter_event_new (CLUTTER_LEAVE);
|
event = clutter_event_new (CLUTTER_LEAVE);
|
||||||
event->crossing.time = device->current_time;
|
event->crossing.time = device->current_time;
|
||||||
event->crossing.flags = 0;
|
event->crossing.flags = 0;
|
||||||
event->crossing.stage = device->stage;
|
event->crossing.stage = stage;
|
||||||
event->crossing.source = old_actor;
|
event->crossing.source = old_actor;
|
||||||
event->crossing.x = device->current_x;
|
event->crossing.x = device->current_x;
|
||||||
event->crossing.y = device->current_y;
|
event->crossing.y = device->current_y;
|
||||||
@ -837,7 +838,7 @@ _clutter_input_device_set_actor (ClutterInputDevice *device,
|
|||||||
event = clutter_event_new (CLUTTER_ENTER);
|
event = clutter_event_new (CLUTTER_ENTER);
|
||||||
event->crossing.time = device->current_time;
|
event->crossing.time = device->current_time;
|
||||||
event->crossing.flags = 0;
|
event->crossing.flags = 0;
|
||||||
event->crossing.stage = device->stage;
|
event->crossing.stage = stage;
|
||||||
event->crossing.x = device->current_x;
|
event->crossing.x = device->current_x;
|
||||||
event->crossing.y = device->current_y;
|
event->crossing.y = device->current_y;
|
||||||
event->crossing.source = actor;
|
event->crossing.source = actor;
|
||||||
@ -1038,6 +1039,7 @@ clutter_input_device_update (ClutterInputDevice *device,
|
|||||||
return old_cursor_actor;
|
return old_cursor_actor;
|
||||||
|
|
||||||
_clutter_input_device_set_actor (device, sequence,
|
_clutter_input_device_set_actor (device, sequence,
|
||||||
|
stage,
|
||||||
new_cursor_actor,
|
new_cursor_actor,
|
||||||
emit_crossing);
|
emit_crossing);
|
||||||
|
|
||||||
@ -1667,12 +1669,14 @@ _clutter_input_device_remove_event_sequence (ClutterInputDevice *device,
|
|||||||
{
|
{
|
||||||
GList *sequences =
|
GList *sequences =
|
||||||
g_hash_table_lookup (device->inv_touch_sequence_actors, info->actor);
|
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);
|
sequences = g_list_remove (sequences, sequence);
|
||||||
|
|
||||||
g_hash_table_replace (device->inv_touch_sequence_actors,
|
g_hash_table_replace (device->inv_touch_sequence_actors,
|
||||||
info->actor, sequences);
|
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);
|
g_hash_table_remove (device->touch_sequences_info, sequence);
|
||||||
|
Loading…
Reference in New Issue
Block a user