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.
This commit is contained in:
Matthias Clasen 2021-03-25 22:39:15 -04:00
parent 6110980012
commit 7849590a82

View File

@ -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;
}