[PATCH libinput 2/9] touchpad: check for the fake_resolution boolean instead of a res value

Peter Hutterer peter.hutterer at who-t.net
Mon Mar 16 22:34:26 PDT 2015


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev-mt-touchpad-buttons.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c
index 3ca37b7..18c32fd 100644
--- a/src/evdev-mt-touchpad-buttons.c
+++ b/src/evdev-mt-touchpad-buttons.c
@@ -513,7 +513,7 @@ tp_init_softbuttons(struct tp_dispatch *tp,
 
 	/* button height: 10mm or 15% of the touchpad height,
 	   whichever is smaller */
-	if (yres > 1 && (height * 0.15/yres) > 10) {
+	if (!device->abs.fake_resolution && (height * 0.15/yres) > 10) {
 		tp->buttons.bottom_area.top_edge =
 		absinfo_y->maximum - 10 * yres;
 	} else {
@@ -550,7 +550,7 @@ tp_init_top_softbuttons(struct tp_dispatch *tp,
 		double topsize_mm = 10 * topbutton_size_mult;
 		double topsize_pct = .15 * topbutton_size_mult;
 
-		if (yres > 1) {
+		if (!device->abs.fake_resolution) {
 			tp->buttons.top_area.bottom_edge =
 			yoffset + topsize_mm * yres;
 		} else {
-- 
2.3.2



More information about the wayland-devel mailing list