seat/x11: Add API to get backend

Will be used instead of going via globals by places that already has a
seat to fetch things from.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2014>
This commit is contained in:
Jonas Ådahl 2021-09-17 15:53:46 +02:00
parent dfbe97a8e5
commit 05b655e60f
2 changed files with 9 additions and 0 deletions

View File

@ -1821,6 +1821,12 @@ meta_seat_x11_new (MetaBackend *backend,
return seat_x11;
}
MetaBackend *
meta_seat_x11_get_backend (MetaSeatX11 *seat_x11)
{
return seat_x11->backend;
}
static ClutterInputDevice *
get_source_device_checked (MetaSeatX11 *seat,
XIDeviceEvent *xev)

View File

@ -30,6 +30,9 @@ MetaSeatX11 * meta_seat_x11_new (MetaBackend *backend,
int opcode,
int logical_pointer,
int logical_keyboard);
MetaBackend * meta_seat_x11_get_backend (MetaSeatX11 *seat_x11);
gboolean meta_seat_x11_translate_event (MetaSeatX11 *seat,
XEvent *xevent,
ClutterEvent *event);