diff --git a/Clipboard.cabal b/Clipboard.cabal
--- a/Clipboard.cabal
+++ b/Clipboard.cabal
@@ -1,5 +1,5 @@
 Name:         Clipboard
-Version:      2.3.1.0
+Version:      2.3.2.0
 Author:       Sævar Berg (Windows), Matthew Bekkema (X11), Daniel Díaz (Maintainer)
 Homepage:     http://haskell.org/haskellwiki/Clipboard
 License:      BSD3
diff --git a/System/Clipboard.hs b/System/Clipboard.hs
--- a/System/Clipboard.hs
+++ b/System/Clipboard.hs
@@ -2,7 +2,6 @@
 {-# LANGUAGE CPP #-}
 
 -- | System Clipboard Interface. It should work on both Windows and Unix (X11).
---   The latter is still experimental.
 module System.Clipboard
     ( -- * Clipboard interface
       setClipboardString
@@ -16,18 +15,18 @@
 import qualified System.Clipboard.X11 as OS
 #endif
 
--- | Writes a string to the clipboard.
+-- | Write a string to the clipboard.
 setClipboardString :: String -> IO ()
 setClipboardString = OS.setClipboardString
 
--- | Gets the contents of the clipboard as a 'String'.
---   Returns 'Nothing' if the clipboard doesn't contain /textual/ data.
+-- | Get the content of the clipboard as a 'String'.
+--   It returns 'Nothing' if the clipboard doesn't contain /textual/ data.
 getClipboardString :: IO (Maybe String)
 getClipboardString = OS.getClipboardString
 
--- | Modifies the clipboard content.
+-- | Modify the clipboard content.
 --   If the clipboard has /textual/ data, this function modifies its content
---   and return 'True'. Otherwise, it does nothing and return 'False'.
+--   and returns 'True'. Otherwise, it does nothing and returns 'False'.
 modifyClipboardString :: (String -> String) -> IO Bool
 modifyClipboardString f = do
  s <- getClipboardString
diff --git a/System/Clipboard/X11.hs b/System/Clipboard/X11.hs
--- a/System/Clipboard/X11.hs
+++ b/System/Clipboard/X11.hs
@@ -1,5 +1,5 @@
 
-{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE RecordWildCards, CPP #-}
 
 module System.Clipboard.X11
   ( getClipboardString
@@ -13,7 +13,9 @@
 import Codec.Binary.UTF8.String (decode, encode)
 import Control.Monad
 import Data.Maybe
+#if !MIN_VERSION_X11(1,8,0)
 import Foreign                  (peekByteOff)
+#endif
 import Foreign.C.Types          (CChar, CUChar)
 import Foreign.Marshal.Array    (withArrayLen)
 import System.Directory         (setCurrentDirectory)
@@ -68,10 +70,13 @@
               sendSelectionNotify display ev_requestor ev_selection ev_target res ev_time
               go clipboards evPtr
 
+#if MIN_VERSION_X11(1,8,0)
+          SelectionClear {..} -> go (filter (/= ev_selection) clipboards) evPtr
+#else
           _ | ev_event_type ev == selectionClear -> do
               target <- peekByteOff evPtr 40 :: IO Atom
               go (filter (/= target) clipboards) evPtr
-
+#endif
           _ -> go clipboards evPtr
 
 handleOutput :: Display -> Window -> Atom -> Maybe String -> [CUChar] -> IO Atom
