diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-03-25 22:39:15 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-03-26 11:09:05 -0400 |
commit | 7849590a82bb40dffdc40eb5bdd3c6ad239c00cc (patch) | |
tree | e112c49e0fc485ffeef5911850866875cf8a7c5e | |
parent | 61109800122643fa402f79e718be9d8812f874ed (diff) | |
download | gtk+-7849590a82bb40dffdc40eb5bdd3c6ad239c00cc.tar.gz |
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.
-rw-r--r-- | gdk/gdkevents.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; } |