From 249235206c604d4404aab4c8acd01c0bec7ecfac Mon Sep 17 00:00:00 2001 From: Adam Vogt Date: Thu, 10 Dec 2009 19:30:38 +0100 Subject: 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 --- XMonad/Actions/GridSelect.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'XMonad/Actions') 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 -- cgit v1.2.3