From: Po Lu Date: Mon, 27 Jun 2022 01:13:33 +0000 (+0800) Subject: Correctly convert event state in more places X-Git-Tag: emacs-29.0.90~1447^2~1435 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=363821344d17b1bac37e509fc3606be913859831;p=emacs.git Correctly convert event state in more places * src/xterm.c (handle_one_xevent): Use `xi_convert_event_state' to handle synthetic and xwidget button events. --- diff --git a/src/xterm.c b/src/xterm.c index 34fbbfb81cb..98ceae6ac16 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -20424,7 +20424,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, { xwidget_button (xvw, xev->evtype == XI_ButtonPress, lrint (xev->event_x), lrint (xev->event_y), - xev->detail, xev->mods.effective, xev->time); + xev->detail, xi_convert_event_state (xev), + xev->time); if (!EQ (selected_window, xvw->w) && (xev->detail < 4)) { @@ -20450,7 +20451,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, bv.x = lrint (xev->event_x); bv.y = lrint (xev->event_y); bv.window = xev->event; - bv.state = xev->mods.effective; + bv.state = xi_convert_event_state (xev); bv.time = xev->time; dpyinfo->last_mouse_glyph_frame = NULL;