diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2023-12-06 19:46:53 -0700 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2023-12-06 19:46:53 -0700 |
| commit | 83543b4972edcebf3d9e568ed6a556ce074daa06 (patch) | |
| tree | 0aa849edd4736d6b0c9bd1865a9ea09dd935ebd8 /src/Rahm | |
| parent | 0a30958905cfea13e2ee3b62fc38a50d62d8a08e (diff) | |
| download | rde-83543b4972edcebf3d9e568ed6a556ce074daa06.tar.gz rde-83543b4972edcebf3d9e568ed6a556ce074daa06.tar.bz2 rde-83543b4972edcebf3d9e568ed6a556ce074daa06.zip | |
Clean the mask for button submaps.
This fixes the bug where many bindings don't work if numberlock is set.
Diffstat (limited to 'src/Rahm')
| -rw-r--r-- | src/Rahm/Desktop/Submap.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Rahm/Desktop/Submap.hs b/src/Rahm/Desktop/Submap.hs index f5d8f9f..d316004 100644 --- a/src/Rahm/Desktop/Submap.hs +++ b/src/Rahm/Desktop/Submap.hs @@ -39,6 +39,7 @@ import XMonad asKeyEvent, buttonPressMask, checkMaskEvent, + cleanMask, currentTime, getEvent, grabKeyboard, @@ -167,7 +168,12 @@ nextButton = do io $ ungrabPointer d currentTime - return ret + mapM + ( \(m', b) -> do + m <- fromIntegral <$> cleanMask (fromIntegral m') + return (m, b) + ) + ret {- Grabs the mouse and reports the next mouse motion. -} nextMotion :: X (Int, Int) |