summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseExposito <jose.exposito89@gmail.com>2021-04-12 09:18:39 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2021-04-13 14:00:57 +1000
commitb64a60a63397a7a1187e70ece8e6c9072510ddcd (patch)
tree371b9808ff5def8c94641aa5f03d38d404fb6457
parent9ce8d561c1bcd9bfe2047d3bb6e099bb5ef3eb2b (diff)
downloadlibinput-b64a60a63397a7a1187e70ece8e6c9072510ddcd.tar.gz
libinput: change gesture notify cancel parameter from int to bool
Change the "cancel" parameter in the existing notify methods (swipe, pinch and gesture_notify) from int to bool. It is used as boolean, the fact that it's an int is just a historical quirkyness. Signed-off-by: José Expósito <jose.exposito89@gmail.com>
-rw-r--r--src/libinput-private.h4
-rw-r--r--src/libinput.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libinput-private.h b/src/libinput-private.h
index 0e2b4370..8ccd5dcf 100644
--- a/src/libinput-private.h
+++ b/src/libinput-private.h
@@ -608,7 +608,7 @@ void
gesture_notify_swipe_end(struct libinput_device *device,
uint64_t time,
int finger_count,
- int cancelled);
+ bool cancelled);
void
gesture_notify_pinch(struct libinput_device *device,
@@ -625,7 +625,7 @@ gesture_notify_pinch_end(struct libinput_device *device,
uint64_t time,
int finger_count,
double scale,
- int cancelled);
+ bool cancelled);
void
tablet_notify_axis(struct libinput_device *device,
diff --git a/src/libinput.c b/src/libinput.c
index 6b7d80a2..b4164e2d 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -2812,7 +2812,7 @@ gesture_notify(struct libinput_device *device,
uint64_t time,
enum libinput_event_type type,
int finger_count,
- int cancelled,
+ bool cancelled,
const struct normalized_coords *delta,
const struct normalized_coords *unaccel,
double scale,
@@ -2855,7 +2855,7 @@ void
gesture_notify_swipe_end(struct libinput_device *device,
uint64_t time,
int finger_count,
- int cancelled)
+ bool cancelled)
{
const struct normalized_coords zero = { 0.0, 0.0 };
@@ -2882,7 +2882,7 @@ gesture_notify_pinch_end(struct libinput_device *device,
uint64_t time,
int finger_count,
double scale,
- int cancelled)
+ bool cancelled)
{
const struct normalized_coords zero = { 0.0, 0.0 };