wayland: Export function to tell whether a button belongs to a pad group

This commit is contained in:
Carlos Garnacho 2016-06-29 18:28:17 +02:00
parent 406677e2a0
commit 18f301cec9
2 changed files with 6 additions and 4 deletions

View File

@ -165,8 +165,8 @@ tablet_pad_group_get_n_modes (MetaWaylandTabletPadGroup *group)
return n_modes; return n_modes;
} }
static gboolean gboolean
tablet_pad_group_has_button (MetaWaylandTabletPadGroup *group, meta_wayland_tablet_pad_group_has_button (MetaWaylandTabletPadGroup *group,
guint button) guint button)
{ {
MetaBackend *backend = meta_get_backend (); MetaBackend *backend = meta_get_backend ();
@ -207,7 +207,7 @@ meta_wayland_tablet_pad_group_notify (MetaWaylandTabletPadGroup *group,
{ {
uint32_t *pos; uint32_t *pos;
if (!tablet_pad_group_has_button (group, i)) if (!meta_wayland_tablet_pad_group_has_button (group, i))
continue; continue;
pos = wl_array_add (&buttons, sizeof (*pos)); pos = wl_array_add (&buttons, sizeof (*pos));

View File

@ -66,6 +66,8 @@ gboolean meta_wayland_tablet_pad_group_handle_event (MetaWaylandTable
void meta_wayland_tablet_pad_group_sync_focus (MetaWaylandTabletPadGroup *group); void meta_wayland_tablet_pad_group_sync_focus (MetaWaylandTabletPadGroup *group);
gboolean meta_wayland_tablet_pad_group_has_button (MetaWaylandTabletPadGroup *group,
guint button);
gboolean meta_wayland_tablet_pad_group_is_mode_switch_button (MetaWaylandTabletPadGroup *group, gboolean meta_wayland_tablet_pad_group_is_mode_switch_button (MetaWaylandTabletPadGroup *group,
guint button); guint button);