[gtk/matthiasc/for-master: 1/2] gdk: Add gdk_device_get_timestamp
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 1/2] gdk: Add gdk_device_get_timestamp
- Date: Fri, 26 Mar 2021 15:11:58 +0000 (UTC)
commit 7849590a82bb40dffdc40eb5bdd3c6ad239c00cc
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Mar 25 22:39:15 2021 -0400
gdk: Add gdk_device_get_timestamp
Give each device a timestamp that reflects the last
user activity with that device, as reflected in the
events that are produced for this device.
gdk/gdkevents.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index f7abfe75b5..43e9c9f01a 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -414,6 +414,9 @@ gdk_event_alloc (GdkEventType event_type,
event->device = device != NULL ? g_object_ref (device) : NULL;
event->time = time_;
+ if (device != NULL && time_ != GDK_CURRENT_TIME)
+ gdk_device_set_timestamp (device, time_);
+
return event;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]