Created
May 15, 2013 16:22
-
-
Save delamonpansie/5585239 to your computer and use it in GitHub Desktop.
Backing store hook.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enableBackingStore dpy win = do | |
unmapWindow dpy win | |
sync dpy False | |
allocaSetWindowAttributes $ \attributes -> do | |
set_backing_store attributes always | |
changeWindowAttributes dpy win cWBackingStore attributes | |
mapWindow dpy win | |
sync dpy False | |
enableBackingStoreHook = | |
ask >>= \w -> liftX $ withDisplay $ \d -> do | |
io $ enableBackingStore d w | |
return idHook |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment