From 3613d4d5430a862eb67d08ed476517e319e702d8 Mon Sep 17 00:00:00 2001 From: Tomas Janousek Date: Sun, 17 Dec 2023 17:29:35 +0000 Subject: [PATCH] X.U.Ungrab: Avoid "Ambiguous occurrence" error in user configs --- XMonad/Util/Ungrab.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/XMonad/Util/Ungrab.hs b/XMonad/Util/Ungrab.hs index 9534259916..c58094762a 100644 --- a/XMonad/Util/Ungrab.hs +++ b/XMonad/Util/Ungrab.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Util.Ungrab @@ -19,6 +20,9 @@ module XMonad.Util.Ungrab {-# DEPRECATED "Use XMonad.Operations.unGrab instead" unGrab ) where +#if MIN_VERSION_xmonad(0, 17, 9) +import XMonad.Operations (unGrab) +#else import Graphics.X11.Xlib (sync) import Graphics.X11.Xlib.Extras (currentTime) import Graphics.X11.Xlib.Misc (ungrabKeyboard, ungrabPointer) @@ -43,3 +47,4 @@ import XMonad.Core -- | Release xmonad's keyboard grab, so other grabbers can do their thing. unGrab :: X () unGrab = withDisplay $ \d -> io (ungrabKeyboard d currentTime >> ungrabPointer d currentTime >> sync d False) +#endif