{
if (!dpyinfo->supports_xi2)
goto OTHER;
+
if (event->xgeneric.extension != dpyinfo->xi2_opcode)
/* Not an XI2 event. */
goto OTHER;
+
bool must_free_data = false;
XIEvent *xi_event = (XIEvent *) event->xcookie.data;
/* Sometimes the event is already claimed by GTK, which
}
XIDeviceEvent *xev = (XIDeviceEvent *) xi_event;
-#ifdef HAVE_XINPUT2_1
- XIValuatorState *states;
- double *values;
- bool found_valuator = false;
-#endif
-
- /* A fake XMotionEvent for x_note_mouse_movement. */
- XMotionEvent ev;
- /* A fake XButtonEvent for x_construct_mouse_click. */
- XButtonEvent bv;
if (!xi_event)
{
case XI_Enter:
{
XIEnterEvent *enter = (XIEnterEvent *) xi_event;
+ XMotionEvent ev;
any = x_top_window_to_frame (dpyinfo, enter->event);
ev.x = lrint (enter->event_x);
ev.y = lrint (enter->event_y);
ev.window = enter->event;
+ ev.time = enter->time;
+
x_display_set_last_user_time (dpyinfo, xi_event->time);
#ifdef USE_MOTIF
case XI_Leave:
{
XILeaveEvent *leave = (XILeaveEvent *) xi_event;
+#ifdef USE_GTK
+ XMotionEvent ev;
ev.x = lrint (leave->event_x);
ev.y = lrint (leave->event_y);
ev.window = leave->event;
+ ev.time = leave->time;
+#endif
+
any = x_top_window_to_frame (dpyinfo, leave->event);
/* This allows us to catch LeaveNotify events generated by
case XI_Motion:
{
struct xi_device_t *device;
+#ifdef HAVE_XINPUT2_1
+ XIValuatorState *states;
+ double *values;
+ bool found_valuator = false;
+#endif
+ /* A fake XMotionEvent for x_note_mouse_movement. */
+ XMotionEvent ev;
#ifdef HAVE_XINPUT2_1
states = &xev->valuators;
#ifdef HAVE_XWIDGETS
struct xwidget_view *xvw;
#endif
+ /* A fake XButtonEvent for x_construct_mouse_click. */
+ XButtonEvent bv;
#ifdef USE_MOTIF
#ifdef USE_TOOLKIT_SCROLL_BARS