mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
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:
parent
6110980012
commit
7849590a82
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user