Skip to content

Commit

Permalink
some cleanups suggested by @LSLears
Browse files Browse the repository at this point in the history
  • Loading branch information
geekosaur committed May 4, 2023
1 parent d351ef4 commit 6e48d47
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions XMonad/Layout/PerScreen.hs
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,10 @@ instance (LayoutClass l1 a, LayoutClass l2 a, Show a) => LayoutClass (OnScreen l
description (OnScreen _ _ l2 False) = description l2

updateL1 :: OnScreen l1 l2 a -> Maybe (l1 a) -> OnScreen l1 l2 a
updateL1 (OnScreen ss l1 l2 _) mlt =
(\lt' -> OnScreen ss lt' l2 True) $ fromMaybe l1 mlt
updateL1 (OnScreen ss l1 l2 _) mlt = OnScreen ss (fromMaybe l1 mlt) l2 True

updateL2 :: OnScreen l1 l2 a -> Maybe (l2 a) -> OnScreen l1 l2 a
updateL2 (OnScreen ss l1 l2 _) mlt =
(\lt' -> OnScreen ss l1 lt' False) $ fromMaybe l2 mlt
updateL2 (OnScreen ss l1 l2 _) mlt = OnScreen ss l1 (fromMaybe l2 mlt) False

-- $deprecated
-- Older versions of this module exported an 'ifWidth' layout modifier. This
Expand All @@ -113,4 +111,4 @@ ifWider :: (LayoutClass l1 a, LayoutClass l2 a)
-> l2 a -- ^ layout to use otherwise
-> BW.PerScreen l1 l2 a
ifWider = BW.ifWider
{-# DEPRECATED ifWider "Use XMonad.Layout.ByWidth.ifWider instead" #-}
{-# DEPRECATED ifWider "Use XMonad.Layout.ByWidth.ifWider instead" #-}

0 comments on commit 6e48d47

Please sign in to comment.