Commit 0f476590 authored by Matthias Clasen's avatar Matthias Clasen

Make gdk_event_get_pointer_emulated public

There is not strong reason to keep the getter private.
At the same time, strip _-prefixes from a few other GdkEvent
APIs. Update all callers.
parent 126156e8
...@@ -273,7 +273,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message) ...@@ -273,7 +273,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer)); gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
if (message->touch.is_emulated) if (message->touch.is_emulated)
_gdk_event_set_pointer_emulated (event, TRUE); gdk_event_set_pointer_emulated (event, TRUE);
if (event_type == GDK_TOUCH_BEGIN || event_type == GDK_TOUCH_UPDATE) if (event_type == GDK_TOUCH_BEGIN || event_type == GDK_TOUCH_UPDATE)
event->touch.state |= GDK_BUTTON1_MASK; event->touch.state |= GDK_BUTTON1_MASK;
...@@ -295,7 +295,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message) ...@@ -295,7 +295,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
event->key.keyval = message->key.key; event->key.keyval = message->key.key;
event->key.state = message->key.state; event->key.state = message->key.state;
event->key.hardware_keycode = message->key.key; event->key.hardware_keycode = message->key.key;
_gdk_event_set_scancode (event, message->key.key); gdk_event_set_scancode (event, message->key.key);
event->key.length = 0; event->key.length = 0;
gdk_event_set_device (event, device_manager->core_keyboard); gdk_event_set_device (event, device_manager->core_keyboard);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_keyboard)); gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_keyboard));
......
...@@ -595,8 +595,8 @@ gdk_event_is_allocated (const GdkEvent *event) ...@@ -595,8 +595,8 @@ gdk_event_is_allocated (const GdkEvent *event)
} }
void void
_gdk_event_set_pointer_emulated (GdkEvent *event, gdk_event_set_pointer_emulated (GdkEvent *event,
gboolean emulated) gboolean emulated)
{ {
if (gdk_event_is_allocated (event)) if (gdk_event_is_allocated (event))
{ {
...@@ -610,7 +610,7 @@ _gdk_event_set_pointer_emulated (GdkEvent *event, ...@@ -610,7 +610,7 @@ _gdk_event_set_pointer_emulated (GdkEvent *event,
} }
gboolean gboolean
_gdk_event_get_pointer_emulated (GdkEvent *event) gdk_event_get_pointer_emulated (GdkEvent *event)
{ {
if (gdk_event_is_allocated (event)) if (gdk_event_is_allocated (event))
return (((GdkEventPrivate *) event)->flags & GDK_EVENT_POINTER_EMULATED) != 0; return (((GdkEventPrivate *) event)->flags & GDK_EVENT_POINTER_EMULATED) != 0;
......
...@@ -1454,6 +1454,9 @@ void gdk_event_set_device_tool (GdkEvent *event, ...@@ -1454,6 +1454,9 @@ void gdk_event_set_device_tool (GdkEvent *event,
GDK_AVAILABLE_IN_3_22 GDK_AVAILABLE_IN_3_22
int gdk_event_get_scancode (GdkEvent *event); int gdk_event_get_scancode (GdkEvent *event);
GDK_AVAILABLE_IN_3_22
gboolean gdk_event_get_pointer_emulated (GdkEvent *event);
G_END_DECLS G_END_DECLS
#endif /* __GDK_EVENTS_H__ */ #endif /* __GDK_EVENTS_H__ */
...@@ -394,11 +394,11 @@ GdkEvent* _gdk_event_unqueue (GdkDisplay *display); ...@@ -394,11 +394,11 @@ GdkEvent* _gdk_event_unqueue (GdkDisplay *display);
void _gdk_event_filter_unref (GdkWindow *window, void _gdk_event_filter_unref (GdkWindow *window,
GdkEventFilter *filter); GdkEventFilter *filter);
void _gdk_event_set_pointer_emulated (GdkEvent *event, void gdk_event_set_pointer_emulated (GdkEvent *event,
gboolean emulated); gboolean emulated);
void _gdk_event_set_scancode (GdkEvent *event, void gdk_event_set_scancode (GdkEvent *event,
guint16 scancode); guint16 scancode);
void gdk_event_set_seat (GdkEvent *event, void gdk_event_set_seat (GdkEvent *event,
GdkSeat *seat); GdkSeat *seat);
......
...@@ -38,8 +38,6 @@ GDK_AVAILABLE_IN_ALL ...@@ -38,8 +38,6 @@ GDK_AVAILABLE_IN_ALL
void gdk_synthesize_window_state (GdkWindow *window, void gdk_synthesize_window_state (GdkWindow *window,
GdkWindowState unset_flags, GdkWindowState unset_flags,
GdkWindowState set_flags); GdkWindowState set_flags);
GDK_AVAILABLE_IN_3_22
gboolean _gdk_event_get_pointer_emulated (GdkEvent *event);
G_END_DECLS G_END_DECLS
......
...@@ -8836,7 +8836,7 @@ proxy_pointer_event (GdkDisplay *display, ...@@ -8836,7 +8836,7 @@ proxy_pointer_event (GdkDisplay *display,
if (pointer_info->need_touch_press_enter && if (pointer_info->need_touch_press_enter &&
gdk_device_get_source (pointer_info->last_slave) != GDK_SOURCE_TOUCHSCREEN && gdk_device_get_source (pointer_info->last_slave) != GDK_SOURCE_TOUCHSCREEN &&
(source_event->type != GDK_TOUCH_UPDATE || (source_event->type != GDK_TOUCH_UPDATE ||
_gdk_event_get_pointer_emulated (source_event))) gdk_event_get_pointer_emulated (source_event)))
{ {
pointer_info->need_touch_press_enter = FALSE; pointer_info->need_touch_press_enter = FALSE;
need_synthetic_enter = TRUE; need_synthetic_enter = TRUE;
...@@ -8930,7 +8930,7 @@ proxy_pointer_event (GdkDisplay *display, ...@@ -8930,7 +8930,7 @@ proxy_pointer_event (GdkDisplay *display,
} }
if ((source_event->type != GDK_TOUCH_UPDATE || if ((source_event->type != GDK_TOUCH_UPDATE ||
_gdk_event_get_pointer_emulated (source_event)) && gdk_event_get_pointer_emulated (source_event)) &&
pointer_info->window_under_pointer != pointer_window) pointer_info->window_under_pointer != pointer_window)
{ {
/* Either a toplevel crossing notify that ended up inside a child window, /* Either a toplevel crossing notify that ended up inside a child window,
...@@ -8965,12 +8965,12 @@ proxy_pointer_event (GdkDisplay *display, ...@@ -8965,12 +8965,12 @@ proxy_pointer_event (GdkDisplay *display,
source_event->type, source_event->type,
state, state,
&evmask, &evmask,
_gdk_event_get_pointer_emulated (source_event), gdk_event_get_pointer_emulated (source_event),
serial); serial);
if (event_type == GDK_TOUCH_UPDATE) if (event_type == GDK_TOUCH_UPDATE)
{ {
if (_gdk_event_get_pointer_emulated (source_event)) if (gdk_event_get_pointer_emulated (source_event))
{ {
/* Touch events emulating pointer events are transformed back /* Touch events emulating pointer events are transformed back
* to pointer events if: * to pointer events if:
...@@ -9138,7 +9138,7 @@ proxy_button_event (GdkEvent *source_event, ...@@ -9138,7 +9138,7 @@ proxy_button_event (GdkEvent *source_event,
!source_event->any.send_event && !source_event->any.send_event &&
(!pointer_grab || (!pointer_grab ||
(type == GDK_TOUCH_BEGIN && pointer_grab->implicit && (type == GDK_TOUCH_BEGIN && pointer_grab->implicit &&
!_gdk_event_get_pointer_emulated (source_event)))) !gdk_event_get_pointer_emulated (source_event))))
{ {
pointer_window = pointer_window =
_gdk_window_find_descendant_at (toplevel_window, _gdk_window_find_descendant_at (toplevel_window,
...@@ -9153,7 +9153,7 @@ proxy_button_event (GdkEvent *source_event, ...@@ -9153,7 +9153,7 @@ proxy_button_event (GdkEvent *source_event,
{ {
if (w->event_mask & GDK_BUTTON_PRESS_MASK && if (w->event_mask & GDK_BUTTON_PRESS_MASK &&
(type == GDK_BUTTON_PRESS || (type == GDK_BUTTON_PRESS ||
_gdk_event_get_pointer_emulated (source_event))) gdk_event_get_pointer_emulated (source_event)))
break; break;
if (type == GDK_TOUCH_BEGIN && if (type == GDK_TOUCH_BEGIN &&
...@@ -9175,7 +9175,7 @@ proxy_button_event (GdkEvent *source_event, ...@@ -9175,7 +9175,7 @@ proxy_button_event (GdkEvent *source_event,
serial, time_); serial, time_);
} }
else if (type == GDK_BUTTON_PRESS || else if (type == GDK_BUTTON_PRESS ||
_gdk_event_get_pointer_emulated (source_event)) gdk_event_get_pointer_emulated (source_event))
{ {
_gdk_display_add_device_grab (display, _gdk_display_add_device_grab (display,
device, device,
...@@ -9203,12 +9203,12 @@ proxy_button_event (GdkEvent *source_event, ...@@ -9203,12 +9203,12 @@ proxy_button_event (GdkEvent *source_event,
pointer_window, pointer_window,
type, state, type, state,
&evmask, &evmask,
_gdk_event_get_pointer_emulated (source_event), gdk_event_get_pointer_emulated (source_event),
serial); serial);
if (type == GDK_TOUCH_BEGIN || type == GDK_TOUCH_END) if (type == GDK_TOUCH_BEGIN || type == GDK_TOUCH_END)
{ {
if (_gdk_event_get_pointer_emulated (source_event)) if (gdk_event_get_pointer_emulated (source_event))
{ {
if ((evmask & GDK_TOUCH_MASK) == 0 || if ((evmask & GDK_TOUCH_MASK) == 0 ||
!_gdk_display_has_touch_grab (display, device, sequence, serial)) !_gdk_display_has_touch_grab (display, device, sequence, serial))
...@@ -9235,7 +9235,7 @@ proxy_button_event (GdkEvent *source_event, ...@@ -9235,7 +9235,7 @@ proxy_button_event (GdkEvent *source_event,
if ((type == GDK_BUTTON_PRESS || if ((type == GDK_BUTTON_PRESS ||
(type == GDK_TOUCH_BEGIN && (type == GDK_TOUCH_BEGIN &&
_gdk_event_get_pointer_emulated (source_event))) && gdk_event_get_pointer_emulated (source_event))) &&
pointer_info->need_touch_press_enter) pointer_info->need_touch_press_enter)
{ {
GdkCrossingMode mode; GdkCrossingMode mode;
...@@ -9263,7 +9263,7 @@ proxy_button_event (GdkEvent *source_event, ...@@ -9263,7 +9263,7 @@ proxy_button_event (GdkEvent *source_event,
source_event->scroll.direction == GDK_SCROLL_SMOOTH) || source_event->scroll.direction == GDK_SCROLL_SMOOTH) ||
((evmask & GDK_SMOOTH_SCROLL_MASK) != 0 && ((evmask & GDK_SMOOTH_SCROLL_MASK) != 0 &&
source_event->scroll.direction != GDK_SCROLL_SMOOTH && source_event->scroll.direction != GDK_SCROLL_SMOOTH &&
_gdk_event_get_pointer_emulated (source_event)))) gdk_event_get_pointer_emulated (source_event))))
return FALSE; return FALSE;
event = _gdk_make_event (event_win, type, source_event, FALSE); event = _gdk_make_event (event_win, type, source_event, FALSE);
...@@ -9303,7 +9303,7 @@ proxy_button_event (GdkEvent *source_event, ...@@ -9303,7 +9303,7 @@ proxy_button_event (GdkEvent *source_event,
_gdk_event_button_generate (display, event); _gdk_event_button_generate (display, event);
else if ((type == GDK_BUTTON_RELEASE || else if ((type == GDK_BUTTON_RELEASE ||
(type == GDK_TOUCH_END && (type == GDK_TOUCH_END &&
_gdk_event_get_pointer_emulated (source_event))) && gdk_event_get_pointer_emulated (source_event))) &&
pointer_window == pointer_info->window_under_pointer && pointer_window == pointer_info->window_under_pointer &&
gdk_device_get_source (source_device) == GDK_SOURCE_TOUCHSCREEN) gdk_device_get_source (source_device) == GDK_SOURCE_TOUCHSCREEN)
{ {
...@@ -9340,7 +9340,7 @@ proxy_button_event (GdkEvent *source_event, ...@@ -9340,7 +9340,7 @@ proxy_button_event (GdkEvent *source_event,
gdk_event_set_source_device (event, source_device); gdk_event_set_source_device (event, source_device);
if (((type == GDK_TOUCH_END || type == GDK_TOUCH_CANCEL) && if (((type == GDK_TOUCH_END || type == GDK_TOUCH_CANCEL) &&
_gdk_event_get_pointer_emulated (source_event)) && gdk_event_get_pointer_emulated (source_event)) &&
pointer_window == pointer_info->window_under_pointer && pointer_window == pointer_info->window_under_pointer &&
gdk_device_get_source (source_device) == GDK_SOURCE_TOUCHSCREEN) gdk_device_get_source (source_device) == GDK_SOURCE_TOUCHSCREEN)
{ {
...@@ -9674,7 +9674,7 @@ _gdk_windowing_got_event (GdkDisplay *display, ...@@ -9674,7 +9674,7 @@ _gdk_windowing_got_event (GdkDisplay *display,
if (pointer_info && if (pointer_info &&
(!is_touch_type (event->type) || (!is_touch_type (event->type) ||
_gdk_event_get_pointer_emulated (event))) gdk_event_get_pointer_emulated (event)))
{ {
guint old_state, old_button; guint old_state, old_button;
...@@ -9722,7 +9722,7 @@ _gdk_windowing_got_event (GdkDisplay *display, ...@@ -9722,7 +9722,7 @@ _gdk_windowing_got_event (GdkDisplay *display,
} }
if (event->type == GDK_BUTTON_RELEASE || if (event->type == GDK_BUTTON_RELEASE ||
_gdk_event_get_pointer_emulated (event)) gdk_event_get_pointer_emulated (event))
{ {
button_release_grab = button_release_grab =
_gdk_display_has_device_grab (display, device, serial); _gdk_display_has_device_grab (display, device, serial);
......
...@@ -133,7 +133,7 @@ generate_key_event (GdkWindow *window, GdkEventType type, guint state, guint key ...@@ -133,7 +133,7 @@ generate_key_event (GdkWindow *window, GdkEventType type, guint state, guint key
event->key.state = state; event->key.state = state;
event->key.keyval = keyval; event->key.keyval = keyval;
event->key.hardware_keycode = keycode + 8; event->key.hardware_keycode = keycode + 8;
_gdk_event_set_scancode (event, keycode + 8); gdk_event_set_scancode (event, keycode + 8);
event->key.is_modifier = is_modifier; event->key.is_modifier = is_modifier;
event->key.time = event_time; event->key.time = event_time;
set_key_event_string (&event->key); set_key_event_string (&event->key);
...@@ -347,7 +347,7 @@ handle_touch_event (GdkWindow *window, ...@@ -347,7 +347,7 @@ handle_touch_event (GdkWindow *window,
gdk_event->touch.x_root = mir_touch_event_axis_value (mir_touch_event, i, mir_touch_axis_x); gdk_event->touch.x_root = mir_touch_event_axis_value (mir_touch_event, i, mir_touch_axis_x);
gdk_event->touch.y_root = mir_touch_event_axis_value (mir_touch_event, i, mir_touch_axis_y); gdk_event->touch.y_root = mir_touch_event_axis_value (mir_touch_event, i, mir_touch_axis_y);
gdk_event->touch.emulating_pointer = TRUE; gdk_event->touch.emulating_pointer = TRUE;
_gdk_event_set_pointer_emulated (gdk_event, TRUE); gdk_event_set_pointer_emulated (gdk_event, TRUE);
send_event (window, get_pointer (window), gdk_event); send_event (window, get_pointer (window), gdk_event);
} }
......
...@@ -1134,7 +1134,7 @@ fill_key_event (GdkWindow *window, ...@@ -1134,7 +1134,7 @@ fill_key_event (GdkWindow *window,
event->key.time = get_time_from_ns_event (nsevent); event->key.time = get_time_from_ns_event (nsevent);
event->key.state = get_keyboard_modifiers_from_ns_event (nsevent); event->key.state = get_keyboard_modifiers_from_ns_event (nsevent);
event->key.hardware_keycode = [nsevent keyCode]; event->key.hardware_keycode = [nsevent keyCode];
_gdk_event_set_scancode (event, [nsevent keyCode]); gdk_event_set_scancode (event, [nsevent keyCode]);
event->key.group = ([nsevent modifierFlags] & NSAlternateKeyMask) ? 1 : 0; event->key.group = ([nsevent modifierFlags] & NSAlternateKeyMask) ? 1 : 0;
event->key.keyval = GDK_KEY_VoidSymbol; event->key.keyval = GDK_KEY_VoidSymbol;
...@@ -1634,7 +1634,7 @@ gdk_event_translate (GdkEvent *event, ...@@ -1634,7 +1634,7 @@ gdk_event_translate (GdkEvent *event,
GdkEvent *emulated_event; GdkEvent *emulated_event;
emulated_event = gdk_event_new (GDK_SCROLL); emulated_event = gdk_event_new (GDK_SCROLL);
_gdk_event_set_pointer_emulated (emulated_event, TRUE); gdk_event_set_pointer_emulated (emulated_event, TRUE);
fill_scroll_event (window, emulated_event, nsevent, fill_scroll_event (window, emulated_event, nsevent,
x, y, x_root, y_root, x, y, x_root, y_root,
dx, dy, direction); dx, dy, direction);
......
...@@ -1083,7 +1083,7 @@ create_scroll_event (GdkWaylandSeat *seat, ...@@ -1083,7 +1083,7 @@ create_scroll_event (GdkWaylandSeat *seat,
event->scroll.state = device_get_modifiers (seat->master_pointer); event->scroll.state = device_get_modifiers (seat->master_pointer);
gdk_event_set_screen (event, display->screen); gdk_event_set_screen (event, display->screen);
_gdk_event_set_pointer_emulated (event, emulated); gdk_event_set_pointer_emulated (event, emulated);
get_coordinates (seat->master_pointer, get_coordinates (seat->master_pointer,
&event->scroll.x, &event->scroll.x,
...@@ -1846,7 +1846,7 @@ deliver_key_event (GdkWaylandSeat *seat, ...@@ -1846,7 +1846,7 @@ deliver_key_event (GdkWaylandSeat *seat,
event->key.state = device_get_modifiers (seat->master_pointer); event->key.state = device_get_modifiers (seat->master_pointer);
event->key.group = 0; event->key.group = 0;
event->key.hardware_keycode = key; event->key.hardware_keycode = key;
_gdk_event_set_scancode (event, key); gdk_event_set_scancode (event, key);
event->key.keyval = sym; event->key.keyval = sym;
event->key.is_modifier = _gdk_wayland_keymap_key_is_modifier (keymap, key); event->key.is_modifier = _gdk_wayland_keymap_key_is_modifier (keymap, key);
...@@ -2042,7 +2042,7 @@ _create_touch_event (GdkWaylandSeat *seat, ...@@ -2042,7 +2042,7 @@ _create_touch_event (GdkWaylandSeat *seat,
if (touch->initial_touch) if (touch->initial_touch)
{ {
_gdk_event_set_pointer_emulated (event, TRUE); gdk_event_set_pointer_emulated (event, TRUE);
event->touch.emulating_pointer = TRUE; event->touch.emulating_pointer = TRUE;
} }
......
...@@ -2340,7 +2340,7 @@ gdk_event_translate (MSG *msg, ...@@ -2340,7 +2340,7 @@ gdk_event_translate (MSG *msg,
event->key.length = 0; event->key.length = 0;
event->key.hardware_keycode = msg->wParam; event->key.hardware_keycode = msg->wParam;
/* save original scancode */ /* save original scancode */
_gdk_event_set_scancode (event, msg->lParam >> 16); gdk_event_set_scancode (event, msg->lParam >> 16);
gdk_event_set_device (event, device_manager_win32->core_keyboard); gdk_event_set_device (event, device_manager_win32->core_keyboard);
gdk_event_set_source_device (event, device_manager_win32->system_keyboard); gdk_event_set_source_device (event, device_manager_win32->system_keyboard);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager_win32->core_keyboard)); gdk_event_set_seat (event, gdk_device_get_seat (device_manager_win32->core_keyboard));
......
...@@ -160,7 +160,7 @@ translate_key_event (GdkDisplay *display, ...@@ -160,7 +160,7 @@ translate_key_event (GdkDisplay *display,
event->key.state = (GdkModifierType) xevent->xkey.state; event->key.state = (GdkModifierType) xevent->xkey.state;
event->key.group = gdk_x11_keymap_get_group_for_state (keymap, xevent->xkey.state); event->key.group = gdk_x11_keymap_get_group_for_state (keymap, xevent->xkey.state);
event->key.hardware_keycode = xevent->xkey.keycode; event->key.hardware_keycode = xevent->xkey.keycode;
_gdk_event_set_scancode (event, xevent->xkey.keycode); gdk_event_set_scancode (event, xevent->xkey.keycode);
event->key.keyval = GDK_KEY_VoidSymbol; event->key.keyval = GDK_KEY_VoidSymbol;
......
...@@ -1469,7 +1469,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator, ...@@ -1469,7 +1469,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
event->key.group = xev->group.effective; event->key.group = xev->group.effective;
event->key.hardware_keycode = xev->detail; event->key.hardware_keycode = xev->detail;
_gdk_event_set_scancode (event, xev->detail); gdk_event_set_scancode (event, xev->detail);
event->key.is_modifier = gdk_x11_keymap_key_is_modifier (keymap, event->key.hardware_keycode); event->key.is_modifier = gdk_x11_keymap_key_is_modifier (keymap, event->key.hardware_keycode);
device = g_hash_table_lookup (device_manager->id_table, device = g_hash_table_lookup (device_manager->id_table,
...@@ -1563,7 +1563,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator, ...@@ -1563,7 +1563,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
#ifdef XINPUT_2_2 #ifdef XINPUT_2_2
if (xev->flags & XIPointerEmulated) if (xev->flags & XIPointerEmulated)
_gdk_event_set_pointer_emulated (event, TRUE); gdk_event_set_pointer_emulated (event, TRUE);
#endif #endif
} }
else else
...@@ -1609,7 +1609,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator, ...@@ -1609,7 +1609,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
#ifdef XINPUT_2_2 #ifdef XINPUT_2_2
if (xev->flags & XIPointerEmulated) if (xev->flags & XIPointerEmulated)
_gdk_event_set_pointer_emulated (event, TRUE); gdk_event_set_pointer_emulated (event, TRUE);
#endif #endif
if (return_val == FALSE) if (return_val == FALSE)
...@@ -1700,7 +1700,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator, ...@@ -1700,7 +1700,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
#ifdef XINPUT_2_2 #ifdef XINPUT_2_2
if (xev->flags & XIPointerEmulated) if (xev->flags & XIPointerEmulated)
_gdk_event_set_pointer_emulated (event, TRUE); gdk_event_set_pointer_emulated (event, TRUE);
#endif #endif
/* There doesn't seem to be motion hints in XI */ /* There doesn't seem to be motion hints in XI */
...@@ -1780,7 +1780,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator, ...@@ -1780,7 +1780,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
if (xev->flags & XITouchEmulatingPointer) if (xev->flags & XITouchEmulatingPointer)
{ {
event->touch.emulating_pointer = TRUE; event->touch.emulating_pointer = TRUE;
_gdk_event_set_pointer_emulated (event, TRUE); gdk_event_set_pointer_emulated (event, TRUE);
} }
if (return_val == FALSE) if (return_val == FALSE)
...@@ -1832,7 +1832,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator, ...@@ -1832,7 +1832,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
if (xev->flags & XITouchEmulatingPointer) if (xev->flags & XITouchEmulatingPointer)
{ {
event->touch.emulating_pointer = TRUE; event->touch.emulating_pointer = TRUE;
_gdk_event_set_pointer_emulated (event, TRUE); gdk_event_set_pointer_emulated (event, TRUE);
} }
event->touch.axes = translate_axes (event->touch.device, event->touch.axes = translate_axes (event->touch.device,
......
...@@ -105,8 +105,6 @@ ...@@ -105,8 +105,6 @@
#include <gobject/gvaluecollector.h> #include <gobject/gvaluecollector.h>
#include <gdk/gdkprivate.h> /* for _gdk_event_get_pointer_emulated() */
#include "gtkaccellabel.h" #include "gtkaccellabel.h"
#include "gtkaccelmap.h" #include "gtkaccelmap.h"
#include "gtkadjustment.h" #include "gtkadjustment.h"
...@@ -3556,7 +3554,7 @@ gtk_menu_scroll (GtkWidget *widget, ...@@ -3556,7 +3554,7 @@ gtk_menu_scroll (GtkWidget *widget,
{ {
GtkMenu *menu = GTK_MENU (widget); GtkMenu *menu = GTK_MENU (widget);
if (_gdk_event_get_pointer_emulated ((GdkEvent *) event)) if (gdk_event_get_pointer_emulated ((GdkEvent *) event))
return GDK_EVENT_PROPAGATE; return GDK_EVENT_PROPAGATE;
switch (event->direction) switch (event->direction)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment