summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2019-11-11 22:34:08 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2019-11-11 22:34:08 +0000
commitb751dbba1e6ef386bc5b2eab9e425475b6ae5f58 (patch)
treec4b2d3e3c23c48ff845e9f8e0abda36619f5ab37
parentmetadata/install-qa-check.d/08gentoo-paths: add explicit maintainer (diff)
downloadgentoo-b751dbba1e6ef386bc5b2eab9e425475b6ae5f58.tar.gz
gentoo-b751dbba1e6ef386bc5b2eab9e425475b6ae5f58.tar.bz2
gentoo-b751dbba1e6ef386bc5b2eab9e425475b6ae5f58.zip
x11-wm/xmonad: add missing xmonad-0.14-check-repeat.patch
Reported-by: Toralf Förster Closes: https://bugs.gentoo.org/699810 Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-rw-r--r--x11-wm/xmonad/files/xmonad-0.14-check-repeat.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/x11-wm/xmonad/files/xmonad-0.14-check-repeat.patch b/x11-wm/xmonad/files/xmonad-0.14-check-repeat.patch
new file mode 100644
index 000000000000..5fb256601585
--- /dev/null
+++ b/x11-wm/xmonad/files/xmonad-0.14-check-repeat.patch
@@ -0,0 +1,56 @@
+diff --git a/src/XMonad/Core.hs b/src/XMonad/Core.hs
+index c79b992..29c7f77 100644
+--- a/src/XMonad/Core.hs
++++ b/src/XMonad/Core.hs
+@@ -68,6 +68,7 @@ data XState = XState
+ , waitingUnmap :: !(M.Map Window Int) -- ^ the number of expected UnmapEvents
+ , dragging :: !(Maybe (Position -> Position -> X (), X ()))
+ , numberlockMask :: !KeyMask -- ^ The numlock modifier
++ , keyPressed :: !KeyCode -- ^ keycode of the key being pressed if any
+ , extensibleState :: !(M.Map String (Either String StateExtension))
+ -- ^ stores custom state information.
+ --
+diff --git a/src/XMonad/Main.hs b/src/XMonad/Main.hs
+index 3b6ace1..bdcab3a 100644
+--- a/src/XMonad/Main.hs
++++ b/src/XMonad/Main.hs
+@@ -219,6 +219,7 @@ launch initxmc = do
+ , mapped = S.empty
+ , waitingUnmap = M.empty
+ , dragging = Nothing
++ , keyPressed = 0
+ , extensibleState = M.empty
+ }
+
+@@ -291,10 +292,15 @@ handle :: Event -> X ()
+ -- run window manager command
+ handle (KeyEvent {ev_event_type = t, ev_state = m, ev_keycode = code})
+ | t == keyPress = withDisplay $ \dpy -> do
+- s <- io $ keycodeToKeysym dpy code 0
+- mClean <- cleanMask m
+- ks <- asks keyActions
+- userCodeDef () $ whenJust (M.lookup (mClean, s) ks) id
++ kp <- gets keyPressed
++ if kp /= code then do
++ modify $ \s -> s { keyPressed = code }
++ s <- io $ keycodeToKeysym dpy code 0
++ mClean <- cleanMask m
++ ks <- asks keyActions
++ userCodeDef () $ whenJust (M.lookup (mClean, s) ks) id
++ else return ()
++ | t == keyRelease = modify $ \s -> s { keyPressed = 0 }
+
+ -- manage a new window
+ handle (MapRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do
+diff --git a/src/XMonad/Operations.hs b/src/XMonad/Operations.hs
+index aa44dcd..747cbf7 100644
+--- a/src/XMonad/Operations.hs
++++ b/src/XMonad/Operations.hs
+@@ -482,6 +482,7 @@ readStateFile xmc = do
+ , mapped = S.empty
+ , waitingUnmap = M.empty
+ , dragging = Nothing
++ , keyPressed = 0
+ , extensibleState = extState
+ }
+ where