From bbdc61c87bdb64af92c958065c3d4f204ac2bee3 Mon Sep 17 00:00:00 2001 From: markt Date: Thu, 28 Jun 2007 22:25:35 +0000 Subject: strip off extra bits set by Xorg in event state --- ChangeLog | 2 ++ src/FbTk/KeyUtil.hh | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b0cfa16..9e031ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ (Format: Year/Month/Day) Changes for 1.0.0: *07/06/28: + * Strip off additional bits in event state set by Xorg, bug #1736252 (Mark) + FbTk/KeyUtil.hh * Added some missing Open Office entries and window managers, plus some other minor changes in fluxbox-generate_menu fluxbox-generate_menu.in diff --git a/src/FbTk/KeyUtil.hh b/src/FbTk/KeyUtil.hh index e80918a..9311561 100644 --- a/src/FbTk/KeyUtil.hh +++ b/src/FbTk/KeyUtil.hh @@ -69,8 +69,9 @@ public: @return the cleaned state number */ unsigned int cleanMods(unsigned int mods) { - //remove numlock, capslock and scrolllock - return mods & ~(capslock() | numlock() | scrolllock()); + // remove numlock, capslock, and scrolllock + // and anything beyond Button5Mask + return mods & ~(capslock() | numlock() | scrolllock()) & ((1<<13) - 1); } /** -- cgit v0.11.2