~jderose/ubuntu/raring/xserver-xorg-input-synaptics/clickpad

« back to all changes in this revision

Viewing changes to src/synaptics.c

  • Committer: Jason Gerard DeRose
  • Date: 2013-06-30 21:02:16 UTC
  • Revision ID: jason@system76.com-20130630210216-jtl2ctueibte9ekm
Clean up final if/else in TS_CLICKPAD_MOVE case

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
/*
110
110
 * To prevent the cursor from jumping when the clickpad is clicked, we ignore
111
111
 * movement the first CLICKPAD_DELAY_COUNT times the callback is called, which
112
 
 * comes out to 112ms (8 * 14 == 112).  See HandleTapProcessing().
 
112
 * comes out to 112ms (8 * 14 == 112).  See HandleTapProcessing
113
113
*/
114
114
#define CLICKPAD_DELAY_COUNT 8
115
115
 
2212
2212
 
2213
2213
        /* To prevent the cursor from jumping when the clickpad is clicked, we
2214
2214
        ignore movement the first CLICKPAD_DELAY_COUNT times the callback is
2215
 
        called, which comes out to 112ms (8 * 14 == 112).  */ 
2216
 
        if (priv->clickpad_delay_count > 0) {
2217
 
            priv->clickpad_delay_count--;
2218
 
            SetMovingState(priv, MS_FALSE, now);
 
2215
        called, which comes out to 112ms (8 * 14 == 112).  */
 
2216
        if (press) {
 
2217
            if (priv->clickpad_delay_count > 0) {
 
2218
                priv->clickpad_delay_count--;
 
2219
                SetMovingState(priv, MS_FALSE, now);
 
2220
            }
 
2221
            else {
 
2222
                SetMovingState(priv, MS_TOUCHPAD_RELATIVE, now);
 
2223
            }
2219
2224
        }
2220
2225
        else {
2221
 
            SetMovingState(priv, MS_TOUCHPAD_RELATIVE, now);
2222
 
        }
2223
 
        if (!press) {
2224
2226
            SetMovingState(priv, MS_FALSE, now);
2225
2227
            SetTapState(priv, TS_MOVE, now);
2226
2228
            priv->count_packet_finger = 0;