From bbf6258aaef308f2d564b4253d37e6c19f8050d9 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 9 Sep 2013 04:12:24 +0200 Subject: Don't use X borders --- XMonad/Config.hs | 12 +++--------- XMonad/Core.hs | 1 - XMonad/Main.hsc | 4 +--- XMonad/Operations.hs | 12 ++---------- 4 files changed, 6 insertions(+), 23 deletions(-) diff --git a/XMonad/Config.hs b/XMonad/Config.hs index ed931b2..1a2c378 100644 --- a/XMonad/Config.hs +++ b/XMonad/Config.hs @@ -26,11 +26,11 @@ module XMonad.Config (defaultConfig, Default(..)) where -- Useful imports -- import XMonad.Core as XMonad hiding - (workspaces,manageHook,keys,logHook,startupHook,borderWidth,mouseBindings + (workspaces,manageHook,keys,logHook,startupHook,mouseBindings ,layoutHook,modMask,terminal,normalBorderColor,focusedBorderColor,focusFollowsMouse ,handleEventHook,clickJustFocuses,rootMask,clientMask) import qualified XMonad.Core as XMonad - (workspaces,manageHook,keys,logHook,startupHook,borderWidth,mouseBindings + (workspaces,manageHook,keys,logHook,startupHook,mouseBindings ,layoutHook,modMask,terminal,normalBorderColor,focusedBorderColor,focusFollowsMouse ,handleEventHook,clickJustFocuses,rootMask,clientMask) @@ -65,11 +65,6 @@ workspaces = map show [1 .. 9 :: Int] defaultModMask :: KeyMask defaultModMask = mod1Mask --- | Width of the window border in pixels. --- -borderWidth :: Dimension -borderWidth = 1 - -- | Border colors for unfocused and focused windows, respectively. -- normalBorderColor, focusedBorderColor :: String @@ -242,8 +237,7 @@ mouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList instance (a ~ Choose Tall (Choose (Mirror Tall) Full)) => Default (XConfig a) where def = XConfig - { XMonad.borderWidth = borderWidth - , XMonad.workspaces = workspaces + { XMonad.workspaces = workspaces , XMonad.layoutHook = layout , XMonad.terminal = terminal , XMonad.normalBorderColor = normalBorderColor diff --git a/XMonad/Core.hs b/XMonad/Core.hs index e60a01a..958cd68 100644 --- a/XMonad/Core.hs +++ b/XMonad/Core.hs @@ -107,7 +107,6 @@ data XConfig l = XConfig -- ^ The key binding: a map from key presses and actions , mouseBindings :: !(XConfig Layout -> M.Map (ButtonMask, Button) (Window -> X ())) -- ^ The mouse bindings - , borderWidth :: !Dimension -- ^ The border width , logHook :: !(X ()) -- ^ The action to perform when the windows set is changed , startupHook :: !(X ()) -- ^ The action to perform on startup , focusFollowsMouse :: !Bool -- ^ Whether window entry events can change focus diff --git a/XMonad/Main.hsc b/XMonad/Main.hsc index c038ecb..653ec9d 100644 --- a/XMonad/Main.hsc +++ b/XMonad/Main.hsc @@ -275,15 +275,13 @@ handle e@(ConfigureRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do ws <- gets windowset wa <- io $ getWindowAttributes dpy w - bw <- asks (borderWidth . config) - if not (member w ws) then do io $ configureWindow dpy w (ev_value_mask e) $ WindowChanges { wc_x = ev_x e , wc_y = ev_y e , wc_width = ev_width e , wc_height = ev_height e - , wc_border_width = fromIntegral bw + , wc_border_width = 0 , wc_sibling = ev_above e , wc_stack_mode = ev_detail e } else io $ allocaXEvent $ \ev -> do diff --git a/XMonad/Operations.hs b/XMonad/Operations.hs index c82cb2f..4a3e3fc 100644 --- a/XMonad/Operations.hs +++ b/XMonad/Operations.hs @@ -92,11 +92,10 @@ windows f = do let oldvisible = concatMap (W.integrate' . W.stack . W.screenWorkspace) $ W.screens old newwindows = W.allWindows ws \\ W.allWindows old ws = f old - XConf { display = d , normalBorder = nbc, focusedBorder = fbc } <- ask + XConf { display = d } <- ask mapM_ setInitialProperties newwindows - whenJust (W.peek old) $ \otherw -> io $ setWindowBorder d otherw nbc modify (\s -> s { windowset = ws }) -- notify non visibility @@ -129,8 +128,6 @@ windows f = do mapM_ (uncurry tileWindow) rects - whenJust (W.peek ws) $ \w -> io $ setWindowBorder d w fbc - mapM_ reveal visible setTopFocus @@ -182,14 +179,9 @@ reveal w = withDisplay $ \d -> do -- | Set some properties when we initially gain control of a window setInitialProperties :: Window -> X () -setInitialProperties w = asks normalBorder >>= \nb -> withDisplay $ \d -> do +setInitialProperties w = withDisplay $ \d -> do setWMState w iconicState asks (clientMask . config) >>= io . selectInput d w - bw <- asks (borderWidth . config) - io $ setWindowBorderWidth d w bw - -- we must initially set the color of new windows, to maintain invariants - -- required by the border setting in 'windows' - io $ setWindowBorder d w nb -- | refresh. Render the currently visible workspaces, as determined by -- the 'StackSet'. Also, set focus to the focused window. -- cgit v1.2.3