mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 19:10:43 -05:00
clutter: Specify stage on clutter_input_device_update() function
This is the function performing the picking, tell it explicitly the stage it should happen on. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1486
This commit is contained in:
parent
3c8376ad91
commit
6a6894a397
@ -200,8 +200,9 @@ void _clutter_input_device_set_actor (ClutterInputDevice *device,
|
||||
gboolean emit_crossing);
|
||||
CLUTTER_EXPORT
|
||||
ClutterActor * clutter_input_device_update (ClutterInputDevice *device,
|
||||
ClutterEventSequence *sequence,
|
||||
gboolean emit_crossing);
|
||||
ClutterEventSequence *sequence,
|
||||
ClutterStage *stage,
|
||||
gboolean emit_crossing);
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_device_add_event_sequence (ClutterInputDevice *device,
|
||||
ClutterEvent *event);
|
||||
|
@ -1001,9 +1001,9 @@ clutter_input_device_get_coords (ClutterInputDevice *device,
|
||||
ClutterActor *
|
||||
clutter_input_device_update (ClutterInputDevice *device,
|
||||
ClutterEventSequence *sequence,
|
||||
ClutterStage *stage,
|
||||
gboolean emit_crossing)
|
||||
{
|
||||
ClutterStage *stage;
|
||||
ClutterActor *new_cursor_actor;
|
||||
ClutterActor *old_cursor_actor;
|
||||
graphene_point_t point = GRAPHENE_POINT_INIT (-1.0f, -1.0f);
|
||||
@ -1012,15 +1012,6 @@ clutter_input_device_update (ClutterInputDevice *device,
|
||||
g_assert (device_type != CLUTTER_KEYBOARD_DEVICE &&
|
||||
device_type != CLUTTER_PAD_DEVICE);
|
||||
|
||||
stage = device->stage;
|
||||
if (G_UNLIKELY (stage == NULL))
|
||||
{
|
||||
CLUTTER_NOTE (EVENT, "No stage defined for device %d '%s'",
|
||||
clutter_input_device_get_device_id (device),
|
||||
clutter_input_device_get_device_name (device));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
clutter_input_device_get_coords (device, sequence, &point);
|
||||
|
||||
old_cursor_actor = clutter_input_device_get_actor (device, sequence);
|
||||
|
@ -1624,7 +1624,8 @@ _clutter_process_event_details (ClutterActor *stage,
|
||||
|
||||
emit_crossing_event (event, device);
|
||||
|
||||
actor = clutter_input_device_update (device, NULL, FALSE);
|
||||
actor = clutter_input_device_update (device, NULL,
|
||||
CLUTTER_STAGE (stage), FALSE);
|
||||
if (actor != stage)
|
||||
{
|
||||
ClutterEvent *crossing;
|
||||
@ -1778,7 +1779,11 @@ _clutter_process_event_details (ClutterActor *stage,
|
||||
* get the actor underneath
|
||||
*/
|
||||
if (device != NULL)
|
||||
actor = clutter_input_device_update (device, NULL, TRUE);
|
||||
{
|
||||
actor = clutter_input_device_update (device, NULL,
|
||||
CLUTTER_STAGE (stage),
|
||||
TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
CLUTTER_NOTE (EVENT, "No device found: picking");
|
||||
@ -1896,7 +1901,11 @@ _clutter_process_event_details (ClutterActor *stage,
|
||||
}
|
||||
|
||||
if (device != NULL)
|
||||
actor = clutter_input_device_update (device, sequence, TRUE);
|
||||
{
|
||||
actor = clutter_input_device_update (device, sequence,
|
||||
CLUTTER_STAGE (stage),
|
||||
TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
CLUTTER_NOTE (EVENT, "No device found: picking");
|
||||
|
@ -1281,7 +1281,7 @@ clutter_stage_update_devices (ClutterStage *stage,
|
||||
for (l = devices; l; l = l->next)
|
||||
{
|
||||
ClutterInputDevice *device = l->data;
|
||||
clutter_input_device_update (device, NULL, TRUE);
|
||||
clutter_input_device_update (device, NULL, stage, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1044,7 +1044,10 @@ meta_wayland_pointer_start_popup_grab (MetaWaylandPointer *pointer,
|
||||
void
|
||||
meta_wayland_pointer_repick (MetaWaylandPointer *pointer)
|
||||
{
|
||||
clutter_input_device_update (pointer->device, NULL, FALSE);
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
ClutterStage *stage = CLUTTER_STAGE (meta_backend_get_stage (backend));
|
||||
|
||||
clutter_input_device_update (pointer->device, NULL, stage, FALSE);
|
||||
repick_for_event (pointer, NULL);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user