This change improves the UX of X.Prompt when `alwaysHighlight` is
enabled. This is especially useful for use with `mkXPromptWithModes`
which forces `alwaysHighlight` to be `True`.
When the user presses the `complKey` and `alwaysHighlight` is `True`,
one of two things will happen:
1. If this is the first time `complKey` is pressed in this round of
completion then the prompt buffer will be updated so it contains
the currently highlighted item.
2. Every other time that the `complKey` is pressed the next
completion item will be selected and the prompt buffer updated.
This gives immediate feedback to the user and allows using some
prompts with `alwaysHighlight` that weren't possible before (e.g.,
shellPrompt, directoryPrompt, etc.)
Prompt should have been using getXMonadDir this entire time but since
we now have getXMonadCacheDir use that instead. This brings
xmonad-contrib inline with the changes in #62.
This also fixesxmonad/xmonad-contrib#68
All False short-cuts the default behavior for the event, which leads to a non-functioning window manager. Returning mempty ensures that the default action is still executed,
Establish active asynchronous pointer grab before entering infinity cycle.
Because xmonad already has passive synchronous pointer grab, this overwrites
it temporary and avoids freezing X, when button press occurs after submap key
press.
Also, terminate submap at button press in the same way, as we do for wrong key
press.
ImpredicativeTypes is practically unsupported extension
on it's way to be removed from GHC:
https://mail.haskell.org/pipermail/ghc-devs/2016-September/012826.html
GHC-8.0.2-rc1 already fails to build xmonad-contrib as:
XMonad/Layout/Groups/Helpers.hs:181:22: error:
• Couldn't match type ‘G.WithID l0 Window
-> XMonad.Util.Stack.Zipper (G.Group l0 Window)
-> XMonad.Util.Stack.Zipper (G.Group l0 Window)’
with ‘G.ModifySpec’
Expected type: (G.WithID l0 Window
-> XMonad.Util.Stack.Zipper (G.Group l0 Window)
-> XMonad.Util.Stack.Zipper (G.Group l0 Window))
-> G.GroupsMessage
Actual type: G.ModifySpec -> G.GroupsMessage
• In the second argument of ‘(.)’, namely ‘G.Modify’
In the expression: sendMessage . G.Modify
In an equation for ‘wrap’: wrap = sendMessage . G.Modify
The workaround is simple: add explicit types to applications
or open-code direct application (this change).
Bug: https://github.com/xmonad/xmonad-contrib/issues/123
Signed-off-by: Sergei Trofimovich <siarheit@google.com>