mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
Fix Haskell2010 incompatibilities
This commit is contained in:
parent
991dc6dfac
commit
0fde4c8848
@ -88,8 +88,8 @@ getScreen (ScreenComparator cmpScreen) (P i) = do w <- gets windowset
|
||||
viewScreen :: ScreenComparator -> PhysicalScreen -> X ()
|
||||
viewScreen sc p = do i <- getScreen sc p
|
||||
whenJust i $ \s -> do
|
||||
w <- screenWorkspace s
|
||||
whenJust w $ windows . W.view
|
||||
w <- screenWorkspace s
|
||||
whenJust w $ windows . W.view
|
||||
|
||||
-- | Send the active window to a given physical screen
|
||||
sendToScreen :: ScreenComparator -> PhysicalScreen -> X ()
|
||||
|
@ -152,12 +152,12 @@ debugEventsHook' PropertyEvent {ev_window = w
|
||||
a' <- atomName a
|
||||
-- too many of these, and they're not real useful
|
||||
if a' == "_NET_WM_USER_TIME" then return () else do
|
||||
windowEvent "Property on" w
|
||||
s' <- case s of
|
||||
1 -> return "deleted"
|
||||
0 -> dumpProperty a a' w (7 + length a')
|
||||
_ -> error "Illegal propState; Xlib corrupted?"
|
||||
say " atom" $ a' ++ s'
|
||||
windowEvent "Property on" w
|
||||
s' <- case s of
|
||||
1 -> return "deleted"
|
||||
0 -> dumpProperty a a' w (7 + length a')
|
||||
_ -> error "Illegal propState; Xlib corrupted?"
|
||||
say " atom" $ a' ++ s'
|
||||
|
||||
debugEventsHook' ExposeEvent {ev_window = w
|
||||
} =
|
||||
@ -812,10 +812,10 @@ dumpUTF :: Decoder Bool
|
||||
dumpUTF = do
|
||||
uTF8_STRING <- inX $ getAtom "UTF8_STRING"
|
||||
guardType uTF8_STRING $ guardSize 8 $ do
|
||||
s <- gets value
|
||||
modify (\r -> r {value = []})
|
||||
append . show . decode . map fromIntegral $ s
|
||||
return True
|
||||
s <- gets value
|
||||
modify (\r -> r {value = []})
|
||||
append . show . decode . map fromIntegral $ s
|
||||
return True
|
||||
|
||||
-- dump an enumerated value using a translation table
|
||||
dumpEnum' :: [String] -> Atom -> Decoder Bool
|
||||
|
@ -273,10 +273,10 @@ instance SetsAmbiguous Ambiguity where
|
||||
guard $ case amb of
|
||||
OnlyLayoutFloatBelow ->
|
||||
let vu = do
|
||||
gr <- sr `R.difference` lr
|
||||
(i2,_w2,wr2) <- ts ++ fs
|
||||
guard $ i2 < i1
|
||||
[wr2 `R.intersects` gr]
|
||||
gr <- sr `R.difference` lr
|
||||
(i2,_w2,wr2) <- ts ++ fs
|
||||
guard $ i2 < i1
|
||||
[wr2 `R.intersects` gr]
|
||||
in lr == wr1 && (not . or) vu
|
||||
OnlyLayoutFloat ->
|
||||
lr == wr1
|
||||
|
Loading…
x
Reference in New Issue
Block a user