]> git.eshelyaron.com Git - emacs.git/commitdiff
Use correct event structures to fetch time on XI2
authorPo Lu <luangruo@yahoo.com>
Sun, 8 May 2022 01:06:40 +0000 (09:06 +0800)
committerPo Lu <luangruo@yahoo.com>
Sun, 8 May 2022 01:06:40 +0000 (09:06 +0800)
* src/xterm.c (handle_one_xevent): Don't use generic `xi_event'
to access the event time.

src/xterm.c

index 848389ce9654f2130c0c4d925d76f8603103e1be..2fc4c559a9cb3e71a09f695062ad4e22540e43cf 100644 (file)
@@ -16807,7 +16807,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
              ev.window = enter->event;
              ev.time = enter->time;
 
-             x_display_set_last_user_time (dpyinfo, xi_event->time);
+             x_display_set_last_user_time (dpyinfo, enter->time);
 
 #ifdef USE_MOTIF
              use_copy = true;
@@ -16955,7 +16955,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                                                         leave->deviceid, false);
 #endif
 
-             x_display_set_last_user_time (dpyinfo, xi_event->time);
+             x_display_set_last_user_time (dpyinfo, leave->time);
 
 #ifdef HAVE_XWIDGETS
              {
@@ -17572,7 +17572,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                {
 #ifndef USE_TOOLKIT_SCROLL_BARS
                  struct scroll_bar *bar
-                   = x_window_to_scroll_bar (xi_event->display, xev->event, 2);
+                   = x_window_to_scroll_bar (dpyinfo->display, xev->event, 2);
 
                  if (bar)
                    x_scroll_bar_note_movement (bar, &ev);
@@ -19149,7 +19149,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 
              device = xi_device_from_id (dpyinfo, pev->deviceid);
              source = xi_device_from_id (dpyinfo, pev->sourceid);
-             x_display_set_last_user_time (dpyinfo, xi_event->time);
+             x_display_set_last_user_time (dpyinfo, pev->time);
 
              if (!device)
                goto XI_OTHER;