Support of both middle button and wheel emulation. --- a/src/evdev.c +++ b/src/evdev.c @@ -326,6 +326,9 @@ void EvdevPostButtonEvent(InputInfoPtr pInfo, int button, int value) { + if (EvdevWheelEmuFilterButton(pInfo, button, value)) + return; + xf86PostButtonEvent(pInfo->dev, 0, button, value, 0, 0); } @@ -514,10 +517,10 @@ if (EvdevDragLockFilterEvent(pInfo, button, value)) return; - if (EvdevWheelEmuFilterButton(pInfo, button, value)) + if (EvdevMBEmuFilterEvent(pInfo, button, value)) return; - if (EvdevMBEmuFilterEvent(pInfo, button, value)) + if (EvdevWheelEmuFilterButton(pInfo, button, value)) return; if (button) --- a/src/emuMB.c +++ b/src/emuMB.c @@ -248,12 +248,12 @@ if ((id = stateTab[pEvdev->emulateMB.state][*btstate][0]) != 0) { - EvdevQueueButtonEvent(pInfo, abs(id), (id >= 0)); + EvdevPostButtonEvent(pInfo, abs(id), (id >= 0)); ret = TRUE; } if ((id = stateTab[pEvdev->emulateMB.state][*btstate][1]) != 0) { - EvdevQueueButtonEvent(pInfo, abs(id), (id >= 0)); + EvdevPostButtonEvent(pInfo, abs(id), (id >= 0)); ret = TRUE; }