aboutsummaryrefslogtreecommitdiffstats
path: root/xevents.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--xevents.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/xevents.c b/xevents.c
index 299993d..5c60f82 100644
--- a/xevents.c
+++ b/xevents.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: xevents.c,v 1.22 2008/06/17 20:55:48 oga Exp $
+ * $Id: xevents.c,v 1.23 2008/06/17 23:40:33 oga Exp $
*/
/*
@@ -228,6 +228,9 @@ xev_handle_buttonpress(struct xevent *xev, XEvent *ee)
cc = client_find(e->window);
+ /* Ignore caps lock and numlock */
+ e->state &= ~(Mod2Mask | LockMask);
+
TAILQ_FOREACH(mb, &Conf.mousebindingq, entry) {
if (e->button == mb->button && e->state == mb->modmask)
break;
@@ -273,6 +276,9 @@ xev_handle_keypress(struct xevent *xev, XEvent *ee)
keysym = XKeycodeToKeysym(X_Dpy, e->keycode, 0);
skeysym = XKeycodeToKeysym(X_Dpy, e->keycode, 1);
+ /* we don't care about caps lock and numlock here */
+ e->state &= ~(LockMask | Mod2Mask);
+
TAILQ_FOREACH(kb, &Conf.keybindingq, entry) {
if (keysym != kb->keysym && skeysym == kb->keysym)
modshift = ShiftMask;