mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-02-08 20:58:58 +00:00
Fix duplicate wheel events on XI2
* src/xterm.c (handle_one_xevent): Don't generate wheel events on XI_ButtonPress.
This commit is contained in:
parent
6d060a38ec
commit
8d02624c0e
27
src/xterm.c
27
src/xterm.c
@ -11393,22 +11393,25 @@ handle_one_xevent (struct x_display_info *dpyinfo,
|
||||
{
|
||||
if (xev->detail >= 4 && xev->detail <= 8)
|
||||
{
|
||||
if (xev->detail <= 5)
|
||||
inev.ie.kind = WHEEL_EVENT;
|
||||
else
|
||||
inev.ie.kind = HORIZ_WHEEL_EVENT;
|
||||
if (xev->evtype == XI_ButtonRelease)
|
||||
{
|
||||
if (xev->detail <= 5)
|
||||
inev.ie.kind = WHEEL_EVENT;
|
||||
else
|
||||
inev.ie.kind = HORIZ_WHEEL_EVENT;
|
||||
|
||||
inev.ie.timestamp = xev->time;
|
||||
inev.ie.timestamp = xev->time;
|
||||
|
||||
XSETINT (inev.ie.x, lrint (xev->event_x));
|
||||
XSETINT (inev.ie.y, lrint (xev->event_y));
|
||||
XSETFRAME (inev.ie.frame_or_window, f);
|
||||
XSETINT (inev.ie.x, lrint (xev->event_x));
|
||||
XSETINT (inev.ie.y, lrint (xev->event_y));
|
||||
XSETFRAME (inev.ie.frame_or_window, f);
|
||||
|
||||
inev.ie.modifiers
|
||||
|= x_x_to_emacs_modifiers (dpyinfo,
|
||||
xev->mods.effective);
|
||||
inev.ie.modifiers
|
||||
|= x_x_to_emacs_modifiers (dpyinfo,
|
||||
xev->mods.effective);
|
||||
|
||||
inev.ie.modifiers |= xev->detail % 2 ? down_modifier : up_modifier;
|
||||
inev.ie.modifiers |= xev->detail % 2 ? down_modifier : up_modifier;
|
||||
}
|
||||
|
||||
goto XI_OTHER;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user