forked from AuroraMiddleware/gtk
wayland: Add internal API for handling Wayland serial numbers
We need to keep track of the serial numbers for various API requests.
This commit is contained in:
parent
17d1c3c833
commit
7fe87016f3
@ -637,3 +637,17 @@ _gdk_wayland_display_load_cursor_theme (GdkWaylandDisplay *wayland_display)
|
||||
w,
|
||||
wayland_display->shm);
|
||||
}
|
||||
|
||||
guint32
|
||||
_gdk_wayland_display_get_serial (GdkWaylandDisplay *wayland_display)
|
||||
{
|
||||
return wayland_display->serial;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_wayland_display_update_serial (GdkWaylandDisplay *wayland_display,
|
||||
guint32 serial)
|
||||
{
|
||||
if (serial > wayland_display->serial)
|
||||
wayland_display->serial = serial;
|
||||
}
|
||||
|
@ -70,8 +70,9 @@ struct _GdkWaylandDisplay
|
||||
/* Startup notification */
|
||||
gchar *startup_notification_id;
|
||||
|
||||
/* Time of most recent user interaction. */
|
||||
/* Time of most recent user interaction and most recent serial */
|
||||
gulong user_time;
|
||||
guint32 serial;
|
||||
|
||||
/* Wayland fields below */
|
||||
struct wl_display *wl_display;
|
||||
|
@ -155,4 +155,7 @@ void _gdk_wayland_window_set_device_grabbed (GdkWindow *window,
|
||||
struct wl_seat *seat,
|
||||
guint32 time_);
|
||||
|
||||
guint32 _gdk_wayland_display_get_serial (GdkWaylandDisplay *wayland_display);
|
||||
void _gdk_wayland_display_update_serial (GdkWaylandDisplay *wayland_display, guint32 serial);
|
||||
|
||||
#endif /* __GDK_PRIVATE_WAYLAND_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user