Skip to content

Instantly share code, notes, and snippets.

@delamonpansie
Created May 15, 2013 16:22
Show Gist options
  • Save delamonpansie/5585239 to your computer and use it in GitHub Desktop.
Save delamonpansie/5585239 to your computer and use it in GitHub Desktop.
Backing store hook.
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