mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
wayland/input-device: Add next serial helper
Add a helper function for getting the next input device serial number. Will be used by keyboard, pointer and touch devices. https://bugzilla.gnome.org/show_bug.cgi?id=771646
This commit is contained in:
parent
ed52e17886
commit
c6106f90d4
@ -26,6 +26,10 @@
|
|||||||
|
|
||||||
#include "wayland/meta-wayland-input-device.h"
|
#include "wayland/meta-wayland-input-device.h"
|
||||||
|
|
||||||
|
#include <wayland-server.h>
|
||||||
|
|
||||||
|
#include "wayland/meta-wayland-seat.h"
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
PROP_0,
|
PROP_0,
|
||||||
@ -51,6 +55,14 @@ meta_wayland_input_device_get_seat (MetaWaylandInputDevice *input_device)
|
|||||||
return priv->seat;
|
return priv->seat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t
|
||||||
|
meta_wayland_input_device_next_serial (MetaWaylandInputDevice *input_device)
|
||||||
|
{
|
||||||
|
MetaWaylandSeat *seat = meta_wayland_input_device_get_seat (input_device);
|
||||||
|
|
||||||
|
return wl_display_next_serial (seat->wl_display);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_wayland_input_device_set_property (GObject *object,
|
meta_wayland_input_device_set_property (GObject *object,
|
||||||
guint prop_id,
|
guint prop_id,
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#define META_WAYLAND_INPUT_DEVICE_H
|
#define META_WAYLAND_INPUT_DEVICE_H
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "wayland/meta-wayland-types.h"
|
#include "wayland/meta-wayland-types.h"
|
||||||
|
|
||||||
@ -42,4 +43,6 @@ struct _MetaWaylandInputDeviceClass
|
|||||||
|
|
||||||
MetaWaylandSeat * meta_wayland_input_device_get_seat (MetaWaylandInputDevice *input_device);
|
MetaWaylandSeat * meta_wayland_input_device_get_seat (MetaWaylandInputDevice *input_device);
|
||||||
|
|
||||||
|
uint32_t meta_wayland_input_device_next_serial (MetaWaylandInputDevice *input_device);
|
||||||
|
|
||||||
#endif /* META_WAYLAND_INPUT_DEVICE_H */
|
#endif /* META_WAYLAND_INPUT_DEVICE_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user