aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vogt <vogt.adam@gmail.com>2009-12-10 19:30:38 +0100
committerAdam Vogt <vogt.adam@gmail.com>2009-12-10 19:30:38 +0100
commit249235206c604d4404aab4c8acd01c0bec7ecfac (patch)
tree0324d141065bf21cf988507eb87e934561a85fe3
parent3347990b42bf11930a9c1e05a7d31851cea929ae (diff)
downloadXMonadContrib-249235206c604d4404aab4c8acd01c0bec7ecfac.tar.gz
XMonadContrib-249235206c604d4404aab4c8acd01c0bec7ecfac.tar.xz
XMonadContrib-249235206c604d4404aab4c8acd01c0bec7ecfac.zip
A.GridSelect shouldn't grab keys if there are no choices.
Ignore-this: 48509f780120014a10b32e7289369f32 Thanks thermal2008 in #xmonad for bringing up the corner case when gridselect is run with an empty list of choices. darcs-hash:20091210183038-1499c-b1c6ae201f7ce908ad09274cef7dd10fe83dd5c2.gz
-rw-r--r--XMonad/Actions/GridSelect.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/XMonad/Actions/GridSelect.hs b/XMonad/Actions/GridSelect.hs
index 943c814..fdcafda 100644
--- a/XMonad/Actions/GridSelect.hs
+++ b/XMonad/Actions/GridSelect.hs
@@ -416,6 +416,7 @@ stringToRatio s = let gen = mkStdGen $ sum $ map fromEnum s
-- | Brings up a 2D grid of elements in the center of the screen, and one can
-- select an element with cursors keys. The selected element is returned.
gridselect :: GSConfig a -> [(String,a)] -> X (Maybe a)
+gridselect _ [] = return Nothing
gridselect gsconfig elmap =
withDisplay $ \dpy -> do
rootw <- asks theRoot