summaryrefslogtreecommitdiff
path: root/src/synapticsstr.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@redhat.com>2008-09-06 03:03:42 +0930
committerPeter Hutterer <peter.hutterer@redhat.com>2008-09-09 19:13:57 +0930
commitdb7dc1085e43ccdd796c67174289313ed4852c13 (patch)
treef84e118325cf07a7984a06bad80990d3b865e6a1 /src/synapticsstr.h
parent5d3a47eed9f5330982d10c3acc15c486e3c86beb (diff)
Don't lose button up event if timeout is cancelled in the same ReadInput cycle
On a left/right button press, middle button emulation springs into action and changes the reported hw state. It then returns a delay that is supposed to set a timer. No button event is posted to the server, the timer ensures that it'll be posted later. If however - in the same cycle - the button up is reported, but with a hardware time > middle emulation timeout, the middle button emulation is canceled. The hw state is reset to button down, and processing continues, reporting the button down event. Since this is in the same cycle, the new delay overrides the previous one and the timer is never set. Introduce a new state into MB emulation that forces the click event if the above situation occurs. Red Hat Bug 233717 <http://bugzilla.redhat.com/show_bug.cgi?id=233717>
Diffstat (limited to 'src/synapticsstr.h')
-rw-r--r--src/synapticsstr.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/synapticsstr.h b/src/synapticsstr.h
index ca61a9c..5d61d0e 100644
--- a/src/synapticsstr.h
+++ b/src/synapticsstr.h
@@ -54,7 +54,9 @@ enum MidButtonEmulation {
MBE_RIGHT, /* Right button pressed, waiting for left button or timeout */
MBE_MID, /* Left and right buttons pressed, waiting for both buttons
to be released */
- MBE_TIMEOUT /* Waiting for both buttons to be released. */
+ MBE_TIMEOUT, /* Waiting for both buttons to be released. */
+ MBE_LEFT_CLICK, /* Emulate left button click. */
+ MBE_RIGHT_CLICK, /* Emulate right button click. */
};
/* See docs/tapndrag.dia for a state machine diagram */