SHARE
TWEET

https://bugs.freedesktop.org/show_bug.cgi?id=66532#c5

a guest Feb 13th, 2014 728 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- a/src/synaptics.c
  2. +++ b/src/synaptics.c  "Taken from https://bugs.freedesktop.org/show_bug.cgi?id=66532#c5"
  3. @@ -2796,6 +2796,7 @@
  4.      int delay = 1000000000;
  5.      int timeleft;
  6.      Bool inside_active_area;
  7. +    int i;
  8.  
  9.      /* If touchpad is switched off, we skip the whole thing and return delay */
  10.      if (para->touchpad_off == TOUCHPAD_OFF) {
  11. @@ -2830,6 +2831,34 @@
  12.  
  13.      inside_active_area = is_inside_active_area(priv, hw->x, hw->y);
  14.  
  15. +    if (para->clickpad) {
  16. +        hw->numFingers = 0;
  17. +        for (i = 0; i < hw->num_mt_mask; i++) {
  18. +            ValuatorMask *f1;
  19. +            Bool mt_inside;
  20. +            double x1, y1;
  21. +
  22. +            if (hw->slot_state[i] == SLOTSTATE_EMPTY ||
  23. +                    hw->slot_state[i] == SLOTSTATE_CLOSE)
  24. +                continue;
  25. +
  26. +            f1 = hw->mt_mask[i];
  27. +            x1 = valuator_mask_get_double(f1, 0);
  28. +            y1 = valuator_mask_get_double(f1, 1);
  29. +            mt_inside = is_inside_active_area(priv, x1, y1);
  30. +            if (!mt_inside) {
  31. +                hw->slot_state[i] = SLOTSTATE_EMPTY;
  32. +                continue;
  33. +            }
  34. +            if (!inside_active_area) {
  35. +                inside_active_area = TRUE;
  36. +                hw->x = x1;
  37. +                hw->y = y1;
  38. +            }
  39. +            hw->numFingers++;
  40. +        }
  41. +    }
  42. +
  43.      /* these two just update hw->left, right, etc. */
  44.      update_hw_button_state(pInfo, hw, priv->old_hw_state, now, &delay);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top