[mutter/wip/tablet-protocol-v2: 141/149] wayland: Add method to relate a pad ring to its group
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/tablet-protocol-v2: 141/149] wayland: Add method to relate a pad ring to its group
- Date: Wed, 20 Jul 2016 17:45:21 +0000 (UTC)
commit 1f7c7bdeaa7ab2463b428a23015ae484eff0b6aa
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Jun 30 18:37:49 2016 +0200
wayland: Add method to relate a pad ring to its group
src/wayland/meta-wayland-tablet-pad-ring.c | 12 ++++++++++++
src/wayland/meta-wayland-tablet-pad-ring.h | 3 +++
2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-wayland-tablet-pad-ring.c b/src/wayland/meta-wayland-tablet-pad-ring.c
index 94230f0..9edb382 100644
--- a/src/wayland/meta-wayland-tablet-pad-ring.c
+++ b/src/wayland/meta-wayland-tablet-pad-ring.c
@@ -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
@@ -209,3 +210,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);
+}
diff --git a/src/wayland/meta-wayland-tablet-pad-ring.h b/src/wayland/meta-wayland-tablet-pad-ring.h
index d729d6d..34ce33a 100644
--- a/src/wayland/meta-wayland-tablet-pad-ring.h
+++ b/src/wayland/meta-wayland-tablet-pad-ring.h
@@ -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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]