diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-04 01:18:24 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-04 01:18:24 +0000 |
| commit | 8c4357fccb29b1c4ddf560748b7e0b3e7285050a (patch) | |
| tree | 14a5b449365ecaed197041961eb0e1ade1801cb9 /otk/eventdispatcher.cc | |
| parent | 4dd8520e929b76f95926ffc746b733a7e416f080 (diff) | |
keep track of the last input event time
Diffstat (limited to 'otk/eventdispatcher.cc')
| -rw-r--r-- | otk/eventdispatcher.cc | 14 |
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 |
