X.H.EwmhDesktops: Deprecate standalone hooks

We should get rid of this error-prone interface ASAP, so mark it as
deprecated to give people some time to adapt their configs.
This commit is contained in:
Tomas Janousek 2021-10-20 14:16:13 +01:00
parent 860f80a6d3
commit f666cf4e4e
2 changed files with 9 additions and 6 deletions

View File

@ -197,15 +197,13 @@ bluetileLayoutHook = avoidStruts $ minimize $ boringWindows $
floatingDeco l = buttonDeco shrinkText defaultThemeWithButtons l floatingDeco l = buttonDeco shrinkText defaultThemeWithButtons l
bluetileConfig = bluetileConfig =
docks $ docks . ewmhFullscreen . ewmh $
def def
{ modMask = mod4Mask, -- logo key { modMask = mod4Mask, -- logo key
manageHook = bluetileManageHook, manageHook = bluetileManageHook,
layoutHook = bluetileLayoutHook, layoutHook = bluetileLayoutHook,
logHook = currentWorkspaceOnTop >> ewmhDesktopsLogHook, logHook = currentWorkspaceOnTop,
handleEventHook = ewmhDesktopsEventHook handleEventHook = minimizeEventHook
`mappend` fullscreenEventHook
`mappend` minimizeEventHook
`mappend` serverModeEventHook' bluetileCommands `mappend` serverModeEventHook' bluetileCommands
`mappend` positionStoreEventHook, `mappend` positionStoreEventHook,
workspaces = bluetileWorkspaces, workspaces = bluetileWorkspaces,

View File

@ -40,7 +40,7 @@ module XMonad.Hooks.EwmhDesktops (
-- $customActivate -- $customActivate
setEwmhActivateHook, setEwmhActivateHook,
-- * Standalone hooks (to be deprecated) -- * Standalone hooks (deprecated)
ewmhDesktopsStartup, ewmhDesktopsStartup,
ewmhDesktopsLogHook, ewmhDesktopsLogHook,
ewmhDesktopsLogHookCustom, ewmhDesktopsLogHookCustom,
@ -230,11 +230,13 @@ setEwmhActivateHook h = XC.modifyDef $ \c -> c{ activateHook = h }
-- | Initializes EwmhDesktops and advertises EWMH support to the X server. -- | Initializes EwmhDesktops and advertises EWMH support to the X server.
{-# DEPRECATED ewmhDesktopsStartup "Use ewmh instead." #-}
ewmhDesktopsStartup :: X () ewmhDesktopsStartup :: X ()
ewmhDesktopsStartup = setSupported ewmhDesktopsStartup = setSupported
-- | Notifies pagers and window lists, such as those in the gnome-panel of the -- | Notifies pagers and window lists, such as those in the gnome-panel of the
-- current state of workspaces and windows. -- current state of workspaces and windows.
{-# DEPRECATED ewmhDesktopsLogHook "Use ewmh instead." #-}
ewmhDesktopsLogHook :: X () ewmhDesktopsLogHook :: X ()
ewmhDesktopsLogHook = XC.withDef ewmhDesktopsLogHook' ewmhDesktopsLogHook = XC.withDef ewmhDesktopsLogHook'
@ -256,6 +258,7 @@ ewmhDesktopsLogHookCustom f =
-- * _NET_ACTIVE_WINDOW (activate another window, changing workspace if needed) -- * _NET_ACTIVE_WINDOW (activate another window, changing workspace if needed)
-- --
-- * _NET_CLOSE_WINDOW (close window) -- * _NET_CLOSE_WINDOW (close window)
{-# DEPRECATED ewmhDesktopsEventHook "Use ewmh instead." #-}
ewmhDesktopsEventHook :: Event -> X All ewmhDesktopsEventHook :: Event -> X All
ewmhDesktopsEventHook = XC.withDef . ewmhDesktopsEventHook' ewmhDesktopsEventHook = XC.withDef . ewmhDesktopsEventHook'
@ -377,6 +380,7 @@ ewmhFullscreen c = c { startupHook = startupHook c <+> fullscreenStartup
, handleEventHook = handleEventHook c <+> fullscreenEventHook } , handleEventHook = handleEventHook c <+> fullscreenEventHook }
-- | Advertises EWMH fullscreen support to the X server. -- | Advertises EWMH fullscreen support to the X server.
{-# DEPRECATED fullscreenStartup "Use ewmhFullscreen instead." #-}
fullscreenStartup :: X () fullscreenStartup :: X ()
fullscreenStartup = setFullscreenSupported fullscreenStartup = setFullscreenSupported
@ -385,6 +389,7 @@ fullscreenStartup = setFullscreenSupported
-- function, such as Totem, Evince and OpenOffice.org. -- function, such as Totem, Evince and OpenOffice.org.
-- --
-- Note this is not included in 'ewmh'. -- Note this is not included in 'ewmh'.
{-# DEPRECATED fullscreenEventHook "Use ewmhFullscreen instead." #-}
fullscreenEventHook :: Event -> X All fullscreenEventHook :: Event -> X All
fullscreenEventHook (ClientMessageEvent _ _ _ dpy win typ (action:dats)) = do fullscreenEventHook (ClientMessageEvent _ _ _ dpy win typ (action:dats)) = do
managed <- isClient win managed <- isClient win