]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix XI2 event filtering for very old versions of libXi
authorPo Lu <luangruo@yahoo.com>
Sun, 16 Jan 2022 13:39:14 +0000 (21:39 +0800)
committerPo Lu <luangruo@yahoo.com>
Sun, 16 Jan 2022 13:40:07 +0000 (21:40 +0800)
* src/xterm.c (handle_one_xevent): Handle cases where
xev->display is NULL.

src/xterm.c

index 4b5358ed658dc87d160c25decd593411f3ea8a0e..3328e659301b4b19b466383f262952ee05e95473 100644 (file)
@@ -10711,7 +10711,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 
              if (f && xev->evtype == XI_ButtonPress
                  && !popup_activated ()
-                 && !x_window_to_scroll_bar (xev->display, xev->event, 2)
+                 && !x_window_to_scroll_bar (dpyinfo->display, xev->event, 2)
                  && !FRAME_NO_ACCEPT_FOCUS (f))
                {
                  /* When clicking into a child frame or when clicking
@@ -10884,7 +10884,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
              xkey.type = KeyPress;
              xkey.serial = xev->serial;
              xkey.send_event = xev->send_event;
-             xkey.display = xev->display;
+             xkey.display = dpyinfo->display;
              xkey.window = xev->event;
              xkey.root = xev->root;
              xkey.subwindow = xev->child;
@@ -11230,7 +11230,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
              xkey.type = KeyRelease;
              xkey.serial = xev->serial;
              xkey.send_event = xev->send_event;
-             xkey.display = xev->display;
+             xkey.display = dpyinfo->display;
              xkey.window = xev->event;
              xkey.root = xev->root;
              xkey.subwindow = xev->child;