mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
clutter: Handle pad button events in clutter_event_get_button()
This commit is contained in:
parent
c789459a31
commit
04629d2bc2
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user