mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
clutter: Handle pad button events in clutter_event_get_button()
This commit is contained in:
parent
88c510c38a
commit
96aed5fd2e
@ -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