From 83543b4972edcebf3d9e568ed6a556ce074daa06 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Wed, 6 Dec 2023 19:46:53 -0700 Subject: Clean the mask for button submaps. This fixes the bug where many bindings don't work if numberlock is set. --- src/Rahm/Desktop/Submap.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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) -- cgit