summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Phi/Widgets/Taskbar.hs6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Phi/Widgets/Taskbar.hs b/lib/Phi/Widgets/Taskbar.hs
index 3f3b3c2..4f85e71 100644
--- a/lib/Phi/Widgets/Taskbar.hs
+++ b/lib/Phi/Widgets/Taskbar.hs
@@ -212,13 +212,9 @@ 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