backends: Do not use clutter_event_[set|is]_pointer_emulated()
Add a new ClutterEventFlag to propagate this information, affecting a few selected events on each backend. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153>
This commit is contained in:
@ -1130,7 +1130,8 @@ notify_scroll (ClutterInputDevice *input_device,
|
||||
event->scroll.scroll_source = scroll_source;
|
||||
event->scroll.finish_flags = flags;
|
||||
|
||||
_clutter_event_set_pointer_emulated (event, emulated);
|
||||
if (emulated)
|
||||
event->any.flags |= CLUTTER_EVENT_FLAG_POINTER_EMULATED;
|
||||
|
||||
queue_event (seat_impl, event);
|
||||
}
|
||||
@ -1163,7 +1164,8 @@ notify_discrete_scroll (ClutterInputDevice *input_device,
|
||||
clutter_event_set_source_device (event, input_device);
|
||||
event->scroll.scroll_source = scroll_source;
|
||||
|
||||
_clutter_event_set_pointer_emulated (event, emulated);
|
||||
if (emulated)
|
||||
event->any.flags |= CLUTTER_EVENT_FLAG_POINTER_EMULATED;
|
||||
|
||||
queue_event (seat_impl, event);
|
||||
}
|
||||
|
@ -2320,7 +2320,7 @@ meta_seat_x11_translate_event (MetaSeatX11 *seat,
|
||||
}
|
||||
|
||||
if (xev->flags & XIPointerEmulated)
|
||||
_clutter_event_set_pointer_emulated (event, TRUE);
|
||||
event->any.flags |= CLUTTER_EVENT_FLAG_POINTER_EMULATED;
|
||||
|
||||
if (xi_event->evtype == XI_ButtonPress)
|
||||
meta_stage_x11_set_user_time (stage_x11, event->button.time);
|
||||
@ -2403,7 +2403,7 @@ meta_seat_x11_translate_event (MetaSeatX11 *seat,
|
||||
&xev->valuators);
|
||||
|
||||
if (xev->flags & XIPointerEmulated)
|
||||
_clutter_event_set_pointer_emulated (event, TRUE);
|
||||
event->any.flags |= CLUTTER_EVENT_FLAG_POINTER_EMULATED;
|
||||
|
||||
g_debug ("motion: win:0x%x device:%d '%s' (x:%.2f, y:%.2f, axes:%s)",
|
||||
(unsigned int) stage_x11->xwin,
|
||||
@ -2475,7 +2475,7 @@ meta_seat_x11_translate_event (MetaSeatX11 *seat,
|
||||
event->touch.sequence = GINT_TO_POINTER (MAX (1, xev->detail + 1));
|
||||
|
||||
if (xev->flags & XITouchEmulatingPointer)
|
||||
_clutter_event_set_pointer_emulated (event, TRUE);
|
||||
event->any.flags |= CLUTTER_EVENT_FLAG_POINTER_EMULATED;
|
||||
|
||||
g_debug ("touch %s: win:0x%x device:%d '%s' (seq:%d, x:%.2f, y:%.2f, axes:%s)",
|
||||
event->type == CLUTTER_TOUCH_BEGIN ? "begin" : "end",
|
||||
@ -2523,7 +2523,7 @@ meta_seat_x11_translate_event (MetaSeatX11 *seat,
|
||||
event->touch.modifier_state |= CLUTTER_BUTTON1_MASK;
|
||||
|
||||
if (xev->flags & XITouchEmulatingPointer)
|
||||
_clutter_event_set_pointer_emulated (event, TRUE);
|
||||
event->any.flags |= CLUTTER_EVENT_FLAG_POINTER_EMULATED;
|
||||
|
||||
meta_seat_x11_update_touchpoint (seat,
|
||||
event->touch.sequence,
|
||||
|
Reference in New Issue
Block a user