Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c9d06e0 authored by Jeff Brown's avatar Jeff Brown
Browse files

Fix bug with mice that send multiple BTN_MOUSE values.

Some mice send different values for BTN_MOUSE key events
when the button is held down (2 for repeat, instead of 1 for down).

Change-Id: I803db1f1584f50f8f5e1d37b6a715e2e1b3943a6
parent e76820bf
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -1183,10 +1183,18 @@ void CursorInputMapper::sync(nsecs_t when) {

        if (downChanged) {
            if (mAccumulator.btnMouse) {
                if (!mLocked.down) {
                    mLocked.down = true;
                    mLocked.downTime = when;
                } else {
                    downChanged = false;
                }
            } else {
                if (mLocked.down) {
                    mLocked.down = false;
                } else {
                    downChanged = false;
                }
            }
        }