make LayoutHints robust with regard to future addition of Layout fields.

This commit is contained in:
David Roundy 2007-06-09 17:37:25 +00:00
parent 35999f266d
commit 972af190c2

View File

@ -9,8 +9,8 @@ import Graphics.X11.Xlib.Extras ( getWMNormalHints )
import XMonad hiding ( trace )
layoutHints :: Layout -> Layout
layoutHints l = Layout { doLayout = \r x -> doLayout l r x >>= applyHints
, modifyLayout = \x -> layoutHints `fmap` modifyLayout l x }
layoutHints l = l { doLayout = \r x -> doLayout l r x >>= applyHints
, modifyLayout = \x -> layoutHints `fmap` modifyLayout l x }
applyHints :: [(Window, Rectangle)] -> X [(Window, Rectangle)]
applyHints xs = mapM applyHint xs