Always use biggest icon
This commit is contained in:
parent
3f4007681a
commit
a4936c35b6
1 changed files with 1 additions and 5 deletions
|
@ -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)
|
||||
|
|
Reference in a new issue