[mutter/wip/tablet-protocol-v2: 19/65] clutter: Handle pad button events in clutter_event_get_button()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/tablet-protocol-v2: 19/65] clutter: Handle pad button events in clutter_event_get_button()
- Date: Wed, 29 Jun 2016 12:21:56 +0000 (UTC)
commit 41793a58a94050da7590e5adc7854b21aed760b3
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jun 22 14:24:42 2016 +0200
clutter: Handle pad button events in clutter_event_get_button()
clutter/clutter/clutter-event.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/clutter/clutter/clutter-event.c b/clutter/clutter/clutter-event.c
index 10ba96c..397327e 100644
--- a/clutter/clutter/clutter-event.c
+++ b/clutter/clutter/clutter-event.c
@@ -819,9 +819,15 @@ clutter_event_get_button (const ClutterEvent *event)
{
g_return_val_if_fail (event != NULL, 0);
g_return_val_if_fail (event->type == CLUTTER_BUTTON_PRESS ||
- event->type == CLUTTER_BUTTON_RELEASE, 0);
+ event->type == CLUTTER_BUTTON_RELEASE ||
+ event->type == CLUTTER_PAD_BUTTON_PRESS ||
+ event->type == CLUTTER_PAD_BUTTON_RELEASE, 0);
- return event->button.button;
+ if (event->type == CLUTTER_BUTTON_PRESS ||
+ event->type == CLUTTER_BUTTON_RELEASE)
+ return event->button.button;
+ else
+ return event->pad_button.button;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]