From b88c8adf219b8e04bfe35a647537c53d3d371e30 Mon Sep 17 00:00:00 2001 From: Adam Vogt Date: Sat, 7 Nov 2009 20:52:55 +0100 Subject: Remove defaulting when using NoMonomorphismRestriction in H.EwmhDesktops Ignore-this: ca3939842639c94ca4fd1ff6624319c1 darcs-hash:20091107195255-1499c-bcc2d2bb68d0a601e39b9b17d029ecedfbd17460.gz --- XMonad/Hooks/EwmhDesktops.hs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'XMonad/Hooks') diff --git a/XMonad/Hooks/EwmhDesktops.hs b/XMonad/Hooks/EwmhDesktops.hs index 724cc13..a0f70b3 100644 --- a/XMonad/Hooks/EwmhDesktops.hs +++ b/XMonad/Hooks/EwmhDesktops.hs @@ -32,6 +32,7 @@ import Control.Monad import qualified XMonad.StackSet as W import XMonad.Hooks.SetWMName +import XMonad.Util.XUtils (fi) import XMonad.Util.WorkspaceCompare -- $usage @@ -132,14 +133,14 @@ handle ClientMessageEvent { a_cw <- getAtom "_NET_CLOSE_WINDOW" a_ignore <- mapM getAtom ["XMONAD_TIMER"] if mt == a_cd then do - let n = fromIntegral (head d) - if 0 <= n && n < length ws then - windows $ W.view (W.tag (ws !! n)) + let n = head d + if 0 <= n && fi n < length ws then + windows $ W.view (W.tag (ws !! fi n)) else trace $ "Bad _NET_CURRENT_DESKTOP with data[0]="++show n else if mt == a_d then do - let n = fromIntegral (head d) - if 0 <= n && n < length ws then - windows $ W.shiftWin (W.tag (ws !! n)) w + let n = head d + if 0 <= n && fi n < length ws then + windows $ W.shiftWin (W.tag (ws !! fi n)) w else trace $ "Bad _NET_DESKTOP with data[0]="++show n else if mt == a_aw then do windows $ W.focusWindow w -- cgit v1.2.3