summaryrefslogtreecommitdiff
path: root/otk/eventdispatcher.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-01-06 06:02:22 +0000
committerDana Jansens <danakj@orodu.net>2003-01-06 06:02:22 +0000
commitf3865bb12c2b3506e181f15f09b8429a59a618f8 (patch)
tree47cfc570cccb295b30e720a83c35e66167798892 /otk/eventdispatcher.cc
parentdbf077a59afa5c7f920d8cc598a26175c9dc612e (diff)
ignore num/caps/scroll lock in events
Diffstat (limited to 'otk/eventdispatcher.cc')
-rw-r--r--otk/eventdispatcher.cc18
1 files changed, 15 insertions, 3 deletions
diff --git a/otk/eventdispatcher.cc b/otk/eventdispatcher.cc
index 51e2251e..62335781 100644
--- a/otk/eventdispatcher.cc
+++ b/otk/eventdispatcher.cc
@@ -56,13 +56,25 @@ void OtkEventDispatcher::dispatchEvents(void)
printf("Event %d window %lx\n", e.type, e.xany.window);
#endif
- // grab the lasttime
+ printf("num=%u scroll=%u\n", OBDisplay::numLockMask(), OBDisplay::scrollLockMask());
+
+ // grab the lasttime and hack up the modifiers
switch (e.type) {
case ButtonPress:
case ButtonRelease:
- _lasttime = e.xbutton.time; break;
+ _lasttime = e.xbutton.time;
+ e.xbutton.state &= ~(LockMask | OBDisplay::numLockMask() |
+ OBDisplay::scrollLockMask());
+ break;
+ case KeyPress:
+ e.xkey.state &= ~(LockMask | OBDisplay::numLockMask() |
+ OBDisplay::scrollLockMask());
+ break;
case MotionNotify:
- _lasttime = e.xmotion.time; break;
+ _lasttime = e.xmotion.time;
+ e.xmotion.state &= ~(LockMask | OBDisplay::numLockMask() |
+ OBDisplay::scrollLockMask());
+ break;
case PropertyNotify:
_lasttime = e.xproperty.time; break;
case EnterNotify: