diff --git a/XMonad/Actions/TreeSelect.hs b/XMonad/Actions/TreeSelect.hs index 4d7ca970..f243787a 100644 --- a/XMonad/Actions/TreeSelect.hs +++ b/XMonad/Actions/TreeSelect.hs @@ -317,7 +317,9 @@ treeselectAt conf@TSConfig{..} zipper hist = withDisplay $ \display -> do set_colormap attributes colormap set_background_pixel attributes ts_background set_border_pixel attributes 0 - createWindow display rootw rect_x rect_y rect_width rect_height 0 (visualInfo_depth vinfo) inputOutput (visualInfo_visual vinfo) (cWColormap .|. cWBorderPixel .|. cWBackPixel) attributes + w <- createWindow display rootw rect_x rect_y rect_width rect_height 0 (visualInfo_depth vinfo) inputOutput (visualInfo_visual vinfo) (cWColormap .|. cWBorderPixel .|. cWBackPixel) attributes + setClassHint display w (ClassHint "xmonad-tree_select" "xmonad") + pure w liftIO $ do -- TODO: move below? diff --git a/XMonad/Layout/Decoration.hs b/XMonad/Layout/Decoration.hs index bd4fbc8c..54c0a25a 100644 --- a/XMonad/Layout/Decoration.hs +++ b/XMonad/Layout/Decoration.hs @@ -377,8 +377,12 @@ createDecos t ds sc s wrs ((w,r):xs) = do createDecos _ _ _ _ _ [] = return [] createDecoWindow :: Theme -> Rectangle -> X Window -createDecoWindow t r = let mask = Just (exposureMask .|. buttonPressMask) in - createNewWindow r mask (inactiveColor t) True +createDecoWindow t r = do + let mask = Just (exposureMask .|. buttonPressMask) + w <- createNewWindow r mask (inactiveColor t) True + d <- asks display + io $ setClassHint d w (ClassHint "xmonad-decoration" "xmonad") + pure w showDecos :: [DecoWin] -> X () showDecos = showWindows . catMaybes . map fst . filter (isJust . snd) diff --git a/XMonad/Prompt.hs b/XMonad/Prompt.hs index fa0efdd4..33982aa2 100644 --- a/XMonad/Prompt.hs +++ b/XMonad/Prompt.hs @@ -558,7 +558,7 @@ mkXPromptImplementation historyKey conf om = do fs <- initXMF (font conf) st' <- io $ bracket - (createWin d rw conf s) + (createPromptWin d rw conf s) (destroyWindow d) (\w -> bracket @@ -1395,8 +1395,8 @@ redrawWindows c = do l -> redrawComplWin l io $ sync d False -createWin :: Display -> Window -> XPConfig -> Rectangle -> IO Window -createWin d rw c s = do +createPromptWin :: Display -> Window -> XPConfig -> Rectangle -> IO Window +createPromptWin d rw c s = do let (x,y) = case position c of Top -> (0,0) Bottom -> (0, rect_height s - height c) @@ -1406,6 +1406,7 @@ createWin d rw c s = do _ -> rect_width s w <- mkUnmanagedWindow d (defaultScreenOfDisplay d) rw (rect_x s + x) (rect_y s + fi y) width (height c) + setClassHint d w (ClassHint "xmonad-prompt" "xmonad") mapWindow d w return w