mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-04 05:58:22 +02:00
dix: put warning in for scroll increments of 0
If the increment is 0 but this is a scroll axis, it's definitely a bug. Nonetheless, it has happened, so put a warning in and a return statement that we avoid the infinite loop and hopefully be able to reproduce later. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
63efa2e7e9
commit
1e95a7df5f
1 changed files with 4 additions and 0 deletions
|
|
@ -1540,6 +1540,10 @@ emulate_scroll_button_events(InternalEvent *events,
|
|||
ax = &dev->valuator->axes[axis];
|
||||
incr = ax->scroll.increment;
|
||||
|
||||
BUG_WARN_MSG(incr == 0, "for device %s\n", dev->name);
|
||||
if (incr == 0)
|
||||
return 0;
|
||||
|
||||
if (type != ButtonPress && type != ButtonRelease)
|
||||
flags |= POINTER_EMULATED;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue