]> git.eshelyaron.com Git - emacs.git/commitdiff
Correctly convert event state in more places
authorPo Lu <luangruo@yahoo.com>
Mon, 27 Jun 2022 01:13:33 +0000 (09:13 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 27 Jun 2022 01:13:33 +0000 (09:13 +0800)
* src/xterm.c (handle_one_xevent): Use `xi_convert_event_state'
to handle synthetic and xwidget button events.

src/xterm.c

index 34fbbfb81cb6176a474bf0d5a2ba03c16b4424d3..98ceae6ac16caba92e5514416315da21ea06085d 100644 (file)
@@ -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;