wayland: Add pointer from MetaWaylandTabletSeat to MetaWaylandSeat
It will be useful to backreference to the MetaWaylandSeat from tablet code.
This commit is contained in:
parent
fd62a1f6ce
commit
5ccde659c1
@ -242,7 +242,7 @@ meta_wayland_tablet_manager_ensure_seat (MetaWaylandTabletManager *manager,
|
|||||||
|
|
||||||
if (!tablet_seat)
|
if (!tablet_seat)
|
||||||
{
|
{
|
||||||
tablet_seat = meta_wayland_tablet_seat_new (manager);
|
tablet_seat = meta_wayland_tablet_seat_new (manager, seat);
|
||||||
g_hash_table_insert (manager->seats, seat, tablet_seat);
|
g_hash_table_insert (manager->seats, seat, tablet_seat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,13 +237,15 @@ static const struct zwp_tablet_seat_v2_interface tablet_seat_interface = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
MetaWaylandTabletSeat *
|
MetaWaylandTabletSeat *
|
||||||
meta_wayland_tablet_seat_new (MetaWaylandTabletManager *manager)
|
meta_wayland_tablet_seat_new (MetaWaylandTabletManager *manager,
|
||||||
|
MetaWaylandSeat *seat)
|
||||||
{
|
{
|
||||||
MetaWaylandTabletSeat *tablet_seat;
|
MetaWaylandTabletSeat *tablet_seat;
|
||||||
const GSList *devices, *l;
|
const GSList *devices, *l;
|
||||||
|
|
||||||
tablet_seat = g_slice_new0 (MetaWaylandTabletSeat);
|
tablet_seat = g_slice_new0 (MetaWaylandTabletSeat);
|
||||||
tablet_seat->manager = manager;
|
tablet_seat->manager = manager;
|
||||||
|
tablet_seat->seat = seat;
|
||||||
tablet_seat->device_manager = clutter_device_manager_get_default ();
|
tablet_seat->device_manager = clutter_device_manager_get_default ();
|
||||||
tablet_seat->tablets = g_hash_table_new_full (NULL, NULL, NULL,
|
tablet_seat->tablets = g_hash_table_new_full (NULL, NULL, NULL,
|
||||||
(GDestroyNotify) meta_wayland_tablet_free);
|
(GDestroyNotify) meta_wayland_tablet_free);
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
struct _MetaWaylandTabletSeat
|
struct _MetaWaylandTabletSeat
|
||||||
{
|
{
|
||||||
MetaWaylandTabletManager *manager;
|
MetaWaylandTabletManager *manager;
|
||||||
|
MetaWaylandSeat *seat;
|
||||||
ClutterDeviceManager *device_manager;
|
ClutterDeviceManager *device_manager;
|
||||||
struct wl_list resource_list;
|
struct wl_list resource_list;
|
||||||
|
|
||||||
@ -39,7 +40,8 @@ struct _MetaWaylandTabletSeat
|
|||||||
GHashTable *pads;
|
GHashTable *pads;
|
||||||
};
|
};
|
||||||
|
|
||||||
MetaWaylandTabletSeat *meta_wayland_tablet_seat_new (MetaWaylandTabletManager *tablet_manager);
|
MetaWaylandTabletSeat *meta_wayland_tablet_seat_new (MetaWaylandTabletManager *tablet_manager,
|
||||||
|
MetaWaylandSeat *seat);
|
||||||
void meta_wayland_tablet_seat_free (MetaWaylandTabletSeat *tablet_seat);
|
void meta_wayland_tablet_seat_free (MetaWaylandTabletSeat *tablet_seat);
|
||||||
|
|
||||||
struct wl_resource *meta_wayland_tablet_seat_create_new_resource (MetaWaylandTabletSeat *tablet_seat,
|
struct wl_resource *meta_wayland_tablet_seat_create_new_resource (MetaWaylandTabletSeat *tablet_seat,
|
||||||
|
Loading…
Reference in New Issue
Block a user