Always use biggest icon

This commit is contained in:
Matthias Schiffer 2011-07-16 03:08:55 +02:00
parent 3f4007681a
commit a4936c35b6

View file

@ -212,14 +212,10 @@ renderText style x y w h text = do
showLayout layout
bestIcon :: Int -> [(Int, Surface)] -> Maybe Surface
bestIcon h icons = findBest $ sortBy compareIcons icons
bestIcon h icons = fmap snd . listToMaybe $ sortBy compareIcons icons
where
compareIcons = flip (compare `on` fst)
findBest (a1:a2:ax) = if (fst a2) < h then Just $ snd a1 else findBest (a2:ax)
findBest [a] = Just $ snd a
findBest [] = Nothing
windowOnDesktop :: Int -> WindowState -> Bool
windowOnDesktop desktop state = (windowVisible state) && (desktop == windowDesktop state)