From 8c4357fccb29b1c4ddf560748b7e0b3e7285050a Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 4 Jan 2003 01:18:24 +0000 Subject: keep track of the last input event time --- otk/eventdispatcher.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'otk/eventdispatcher.cc') diff --git a/otk/eventdispatcher.cc b/otk/eventdispatcher.cc index bf2abeec..0c25ab08 100644 --- a/otk/eventdispatcher.cc +++ b/otk/eventdispatcher.cc @@ -56,6 +56,20 @@ void OtkEventDispatcher::dispatchEvents(void) printf("Event %d window %lx\n", e.type, e.xany.window); #endif + // grab the lasttime + switch (e.type) { + case ButtonPress: + case ButtonRelease: + _lasttime = e.xbutton.time; break; + case MotionNotify: + _lasttime = e.xmotion.time; break; + case PropertyNotify: + _lasttime = e.xproperty.time; break; + case EnterNotify: + case LeaveNotify: + _lasttime = e.xcrossing.time; break; + } + // these ConfigureRequests require some special attention if (e.type == ConfigureRequest) { // find the actual window! e.xany.window is the parent window -- cgit v1.2.3