diff options
-rw-r--r-- | man/synaptics.man | 3 | ||||
-rw-r--r-- | src/synaptics.c | 16 |
2 files changed, 10 insertions, 9 deletions
diff --git a/man/synaptics.man b/man/synaptics.man index 2b7b7b9..079a5f8 100644 --- a/man/synaptics.man +++ b/man/synaptics.man @@ -443,7 +443,8 @@ bottom edge of the middle button, respectively. Any of the values may be given as percentage of the touchpad width or height, whichever applies. If any edge is set to 0 (not 0%), the button is assumed to extend to infinity in the given direction. Setting all values to 0 (not 0%) disables -soft button areas. +soft button areas. Button areas may not overlap, however it is permitted for two +buttons to share an edge value. Property: "Synaptics Soft Button Areas" . diff --git a/src/synaptics.c b/src/synaptics.c index 3437d9d..f0a8269 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -421,13 +421,13 @@ SynapticsIsSoftButtonAreasValid(int *values) if ((right_bottom <= middle_bottom && right_bottom >= middle_top) || (right_top <= middle_bottom && right_top >= middle_top)) { /* Check for overlapping left edges */ - if ((right_left < middle_left && right_right >= middle_left) || - (middle_left < right_left && middle_right >= right_left)) + if ((right_left < middle_left && right_right > middle_left) || + (middle_left < right_left && middle_right > right_left)) return FALSE; /* Check for overlapping right edges */ - if ((right_right > middle_right && right_left <= middle_right) || - (middle_right > right_right && middle_left <= right_right)) + if ((right_right > middle_right && right_left < middle_right) || + (middle_right > right_right && middle_left < right_right)) return FALSE; } @@ -435,13 +435,13 @@ SynapticsIsSoftButtonAreasValid(int *values) if ((right_left >= middle_left && right_left <= middle_right) || (right_right >= middle_left && right_right <= middle_right)) { /* Check for overlapping top edges */ - if ((right_top < middle_top && right_bottom >= middle_top) || - (middle_top < right_top && middle_bottom >= right_top)) + if ((right_top < middle_top && right_bottom > middle_top) || + (middle_top < right_top && middle_bottom > right_top)) return FALSE; /* Check for overlapping bottom edges */ - if ((right_bottom > middle_bottom && right_top <= middle_bottom) || - (middle_bottom > right_bottom && middle_top <= right_bottom)) + if ((right_bottom > middle_bottom && right_top < middle_bottom) || + (middle_bottom > right_bottom && middle_top < right_bottom)) return FALSE; } } |