[gtk+/composite-templates] wayland: Add internal API for handling Wayland serial numbers
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/composite-templates] wayland: Add internal API for handling Wayland serial numbers
- Date: Sun, 15 Jul 2012 21:48:45 +0000 (UTC)
commit 8d3c7ea98bed9624eae775e4ca1cb437072af970
Author: Rob Bradford <rob linux intel com>
Date: Wed Jul 11 17:06:32 2012 +0100
wayland: Add internal API for handling Wayland serial numbers
We need to keep track of the serial numbers for various API requests.
gdk/wayland/gdkdisplay-wayland.c | 14 ++++++++++++++
gdk/wayland/gdkdisplay-wayland.h | 3 ++-
gdk/wayland/gdkprivate-wayland.h | 3 +++
3 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index c50d09c..c4407a6 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -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;
+}
diff --git a/gdk/wayland/gdkdisplay-wayland.h b/gdk/wayland/gdkdisplay-wayland.h
index 00f3a39..8b6dd5c 100644
--- a/gdk/wayland/gdkdisplay-wayland.h
+++ b/gdk/wayland/gdkdisplay-wayland.h
@@ -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;
diff --git a/gdk/wayland/gdkprivate-wayland.h b/gdk/wayland/gdkprivate-wayland.h
index 59cd173..6b4d3b8 100644
--- a/gdk/wayland/gdkprivate-wayland.h
+++ b/gdk/wayland/gdkprivate-wayland.h
@@ -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__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]