wayland: Add method to relate a pad ring to its group
This commit is contained in:
parent
5effde59f6
commit
062b696df2
@ -33,6 +33,7 @@
|
||||
#include "meta-surface-actor-wayland.h"
|
||||
#include "meta-wayland-private.h"
|
||||
#include "meta-wayland-tablet-pad.h"
|
||||
#include "meta-wayland-tablet-pad-group.h"
|
||||
#include "meta-wayland-tablet-pad-ring.h"
|
||||
|
||||
static void
|
||||
@ -193,3 +194,14 @@ meta_wayland_tablet_pad_ring_sync_focus (MetaWaylandTabletPadRing *ring)
|
||||
wl_resource_get_client (ring->pad->focus_surface->resource));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_tablet_pad_ring_set_group (MetaWaylandTabletPadRing *ring,
|
||||
MetaWaylandTabletPadGroup *group)
|
||||
{
|
||||
/* Group is static, can only be set once */
|
||||
g_assert (ring->group == NULL);
|
||||
|
||||
ring->group = group;
|
||||
group->rings = g_list_append (group->rings, ring);
|
||||
}
|
||||
|
@ -32,6 +32,7 @@
|
||||
struct _MetaWaylandTabletPadRing
|
||||
{
|
||||
MetaWaylandTabletPad *pad;
|
||||
MetaWaylandTabletPadGroup *group;
|
||||
|
||||
struct wl_list resource_list;
|
||||
struct wl_list focus_resource_list;
|
||||
@ -42,6 +43,8 @@ struct _MetaWaylandTabletPadRing
|
||||
MetaWaylandTabletPadRing * meta_wayland_tablet_pad_ring_new (MetaWaylandTabletPad *pad);
|
||||
void meta_wayland_tablet_pad_ring_free (MetaWaylandTabletPadRing *ring);
|
||||
|
||||
void meta_wayland_tablet_pad_ring_set_group (MetaWaylandTabletPadRing *ring,
|
||||
MetaWaylandTabletPadGroup *group);
|
||||
struct wl_resource *
|
||||
meta_wayland_tablet_pad_ring_create_new_resource (MetaWaylandTabletPadRing *ring,
|
||||
struct wl_client *client,
|
||||
|
Loading…
Reference in New Issue
Block a user