wayland: Add method to relate a pad strip to its group

This commit is contained in:
Carlos Garnacho 2016-06-30 18:38:01 +02:00
parent 062b696df2
commit 62e4954c96
2 changed files with 16 additions and 0 deletions

View File

@ -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-strip.h"
static void
@ -192,3 +193,14 @@ meta_wayland_tablet_pad_strip_sync_focus (MetaWaylandTabletPadStrip *strip)
wl_resource_get_client (strip->pad->focus_surface->resource));
}
}
void
meta_wayland_tablet_pad_strip_set_group (MetaWaylandTabletPadStrip *strip,
MetaWaylandTabletPadGroup *group)
{
/* Group is static, can only be set once */
g_assert (strip->group == NULL);
strip->group = group;
group->strips = g_list_append (group->strips, strip);
}

View File

@ -32,6 +32,7 @@
struct _MetaWaylandTabletPadStrip
{
MetaWaylandTabletPad *pad;
MetaWaylandTabletPadGroup *group;
struct wl_list resource_list;
struct wl_list focus_resource_list;
@ -42,6 +43,9 @@ struct _MetaWaylandTabletPadStrip
MetaWaylandTabletPadStrip * meta_wayland_tablet_pad_strip_new (MetaWaylandTabletPad *pad);
void meta_wayland_tablet_pad_strip_free (MetaWaylandTabletPadStrip *strip);
void meta_wayland_tablet_pad_strip_set_group (MetaWaylandTabletPadStrip *strip,
MetaWaylandTabletPadGroup *group);
struct wl_resource *
meta_wayland_tablet_pad_strip_create_new_resource (MetaWaylandTabletPadStrip *strip,
struct wl_client *client,