Closed sylecn closed 5 months ago
Hi slotThe, thanks for the review.
I fixed some issues you mentioned and force pushed. Remaining two issues:
Nothing -> whenMaybe (not $ gs_cancelOnEmptyClick gsconfig) contEventloop
xmonad-contrib> • Couldn't match type ‘a’ with ‘Maybe a’
xmonad-contrib> Expected: TwoD a a
xmonad-contrib> Actual: TwoD a (Maybe a)
xmonad-contrib> ‘a’ is a rigid type variable bound by
xmonad-contrib> the type signature for:
xmonad-contrib> stdHandle :: forall a.
xmonad-contrib> Event -> TwoD a (Maybe a) -> TwoD a (Maybe a)
1. about whenMaybe. whenMaybe is in extra package, which is not currently in dependency list. Do you want to add it as a dependency, or just add a local definition?
Oops, I thought we have this in ManageHook. Nevermind then, you don't have to create an extra definition for this.
3. since the change is moved to "Breaking Changes" section, would you say it's okay to set gs_cancelOnEmptyClick to True by default? Which value is a better default?
You don't have to necessarily move the whole thing to breaking changes, just the part that's actually a breaking change. I'd say this is can be a reasonable default
I set the default value to True and updated the doc accordingly.
Thanks!
Description
In the original code, when a GridSelect is shown, user has to use a keyboard to cancel it (ESC key by default). With this field added, when it is set to True, mouse click on empty space can cancel the GridSelect.
When user trigger a GridSelect action using mouse, this change makes it easier to cancel the Grid, without reaching to the keyboard.
Checklist
[x] I've read CONTRIBUTING.md
[x] I've considered how to best test these changes (property, unit, manually, ...) and concluded:
I have tested the code manually. The default setting preserves the original behavior. User has to opt-in to get the new feature, to reduce surprises.
To test the new behavior,
myGoToSelected = goToSelected def { gs_cancelOnEmptyClick = True }
-- try it with a key binding , ("M-", myGoToSelected)