[PATCH synaptics] Don't check for soft buttons if a button is already down

Chase Douglas chase.douglas at canonical.com
Wed May 9 09:27:20 PDT 2012


On 05/08/2012 11:36 PM, Peter Hutterer wrote:
> Moving into a different soft button's area during drag-n-drop would trigger
> a click of that button.
> 
> http://bugzilla.redhat.com/819348
> 
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>  src/synaptics.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/synaptics.c b/src/synaptics.c
> index 7881926..e47d8ff 100644
> --- a/src/synaptics.c
> +++ b/src/synaptics.c
> @@ -2539,7 +2539,7 @@ update_hw_button_state(const InputInfoPtr pInfo, struct SynapticsHwState *hw,
>  
>      /* If this is a clickpad and the user clicks in a soft button area, press
>       * the soft button instead. */
> -    if (para->clickpad && hw->left && !hw->right && !hw->middle) {
> +    if (para->clickpad && hw->left && !hw->right && !hw->middle && !old->left) {
>          if (is_inside_rightbutton_area(para, hw->x, hw->y)) {
>              hw->left = 0;
>              hw->right = 1;

Won't this do something wrong (e.g. not switch from left to right button
for right button area) for all events after the initial press event?

-- Chase


More information about the xorg-devel mailing list