summaryrefslogtreecommitdiff
path: root/otk/eventdispatcher.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-01-04 01:18:24 +0000
committerDana Jansens <danakj@orodu.net>2003-01-04 01:18:24 +0000
commit8c4357fccb29b1c4ddf560748b7e0b3e7285050a (patch)
tree14a5b449365ecaed197041961eb0e1ade1801cb9 /otk/eventdispatcher.cc
parent4dd8520e929b76f95926ffc746b733a7e416f080 (diff)
keep track of the last input event time
Diffstat (limited to 'otk/eventdispatcher.cc')
-rw-r--r--otk/eventdispatcher.cc14
1 files changed, 14 insertions, 0 deletions
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