From: Po Lu Date: Sun, 16 Jan 2022 13:39:14 +0000 (+0800) Subject: Fix XI2 event filtering for very old versions of libXi X-Git-Tag: emacs-29.0.90~3009 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8f652465238aff062851a1f8bf1d76f5503ac1a9;p=emacs.git Fix XI2 event filtering for very old versions of libXi * src/xterm.c (handle_one_xevent): Handle cases where xev->display is NULL. --- diff --git a/src/xterm.c b/src/xterm.c index 4b5358ed658..3328e659301 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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;