[effects] fix mouse wheel detection

This commit is contained in:
David Edmundson 2019-11-15 14:10:03 +00:00
parent cb7022150d
commit c22546868d

View file

@ -39,7 +39,7 @@ bool EffectsMouseInterceptionX11Filter::event(xcb_generic_event_t *event)
if (eventType == XCB_BUTTON_PRESS || eventType == XCB_BUTTON_RELEASE) {
auto *me = reinterpret_cast<xcb_button_press_event_t*>(event);
if (m_window == me->event) {
const bool isWheel = me->detail >= 4 || me->detail <= 7;
const bool isWheel = me->detail >= 4 && me->detail <= 7;
if (isWheel) {
if (eventType != XCB_BUTTON_PRESS) {
return false;