[ghc-xmonad-contrib] add 3 patches: for xft, _NET_WM_STATE, and BorderSize fixes

Jens Petersen petersen at fedoraproject.org
Wed Mar 14 09:51:01 UTC 2012


commit 789f63c6d59d614de551ed3b288512a41684008a
Author: Jens Petersen <petersen at redhat.com>
Date:   Wed Mar 14 18:50:51 2012 +0900

    add 3 patches: for xft, _NET_WM_STATE, and BorderSize fixes
    
    - use xft fonts by default
    - make ewmh set _NET_WM_STATE property on windows so that gtk3 apps do
      not render unfocused
    - place BorderResize rectangles within window decor with narrower width

 ghc-xmonad-contrib.spec                         |   14 ++++++++-
 xmonad-contrib-0.10-BorderResize-smaller.patch  |   30 +++++++++++++++++++
 xmonad-contrib-0.10-ewmh-set-NET_WM_STATE.patch |   11 +++++++
 xmonad-contrib-0.10-xft-fonts.patch             |   36 +++++++++++++++++++++++
 4 files changed, 90 insertions(+), 1 deletions(-)
---
diff --git a/ghc-xmonad-contrib.spec b/ghc-xmonad-contrib.spec
index 77d3d87..cfceecc 100644
--- a/ghc-xmonad-contrib.spec
+++ b/ghc-xmonad-contrib.spec
@@ -19,7 +19,7 @@ your own extensions.
 
 Name:           ghc-%{pkg_name}
 Version:        0.10
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        %{common_summary}
 
 Group:          System Environment/Libraries
@@ -44,6 +44,9 @@ BuildRequires:  ghc-unix-devel
 BuildRequires:  ghc-utf8-string-devel
 BuildRequires:  ghc-X11-xft-devel
 BuildRequires:  ghc-xmonad-devel
+Patch1:         xmonad-contrib-0.10-xft-fonts.patch
+Patch2:         xmonad-contrib-0.10-ewmh-set-NET_WM_STATE.patch
+Patch3:         xmonad-contrib-0.10-BorderResize-smaller.patch
 
 %description
 %{common_description}
@@ -51,6 +54,9 @@ BuildRequires:  ghc-xmonad-devel
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
+%patch1 -p1 -b .orig-misc-fixed
+%patch2 -p1 -b .orig-NET_WM_STATE
+%patch3 -p1 -b .orig-mouseborder
 
 
 %build
@@ -75,6 +81,12 @@ BuildRequires:  ghc-xmonad-devel
 
 
 %changelog
+* Tue Mar 13 2012 Jens Petersen <petersen at redhat.com> - 0.10-3
+- use xft fonts by default
+- make ewmh set _NET_WM_STATE property on windows so that gtk3 apps do
+  not render unfocused
+- place BorderResize rectangles within window decor with narrower width
+
 * Fri Jan  6 2012 Jens Petersen <petersen at redhat.com> - 0.10-2
 - update to cabal2spec-0.25.2
 
diff --git a/xmonad-contrib-0.10-BorderResize-smaller.patch b/xmonad-contrib-0.10-BorderResize-smaller.patch
new file mode 100644
index 0000000..6d4edb5
--- /dev/null
+++ b/xmonad-contrib-0.10-BorderResize-smaller.patch
@@ -0,0 +1,30 @@
+diff -u xmonad-contrib-0.10/XMonad/Layout/BorderResize.hs.orig-mouseborder xmonad-contrib-0.10/XMonad/Layout/BorderResize.hs
+--- xmonad-contrib-0.10/XMonad/Layout/BorderResize.hs.orig-mouseborder	2011-11-19 08:26:06.000000000 +0900
++++ xmonad-contrib-0.10/XMonad/Layout/BorderResize.hs	2012-03-14 09:46:54.458546418 +0900
+@@ -59,10 +59,8 @@
+ 
+ data BorderResize a = BR (M.Map Window RectWithBorders) deriving (Show, Read)
+ 
+-brBorderOffset :: Position
+-brBorderOffset = 5
+ brBorderSize :: Dimension
+-brBorderSize = 10
++brBorderSize = 2
+ 
+ borderResize :: l a -> ModifiedLayout BorderResize l a
+ borderResize = ModifiedLayout (BR M.empty)
+@@ -147,10 +145,10 @@
+ 
+ prepareBorders :: Rectangle -> [BorderBlueprint]
+ prepareBorders (Rectangle x y wh ht) =
+-    [((Rectangle (x + fi wh - brBorderOffset) y brBorderSize ht), xC_right_side , RightSideBorder),
+-     ((Rectangle (x - brBorderOffset) y brBorderSize ht)        , xC_left_side  , LeftSideBorder),
+-     ((Rectangle x (y - brBorderOffset) wh brBorderSize)        , xC_top_side   , TopSideBorder),
+-     ((Rectangle x (y + fi ht - brBorderOffset) wh brBorderSize), xC_bottom_side, BottomSideBorder)
++    [((Rectangle (x + fi wh - fi brBorderSize) y brBorderSize ht), xC_right_side , RightSideBorder),
++     ((Rectangle x y brBorderSize ht)                            , xC_left_side  , LeftSideBorder),
++     ((Rectangle x y wh brBorderSize)                            , xC_top_side   , TopSideBorder),
++     ((Rectangle x (y + fi ht - fi brBorderSize) wh brBorderSize), xC_bottom_side, BottomSideBorder)
+     ]
+ 
+ handleResize :: [(Window, (BorderType, Window, Rectangle))] -> Event -> X ()
diff --git a/xmonad-contrib-0.10-ewmh-set-NET_WM_STATE.patch b/xmonad-contrib-0.10-ewmh-set-NET_WM_STATE.patch
new file mode 100644
index 0000000..0b1ea9f
--- /dev/null
+++ b/xmonad-contrib-0.10-ewmh-set-NET_WM_STATE.patch
@@ -0,0 +1,11 @@
+diff -u xmonad-contrib-0.10/XMonad/Hooks/EwmhDesktops.hs\~ xmonad-contrib-0.10/XMonad/Hooks/EwmhDesktops.hs
+--- xmonad-contrib-0.10/XMonad/Hooks/EwmhDesktops.hs~	2011-11-19 08:26:06.000000000 +0900
++++ xmonad-contrib-0.10/XMonad/Hooks/EwmhDesktops.hs	2012-03-09 16:59:48.115503713 +0900
+@@ -252,3 +252,7 @@
+     a <- getAtom "_NET_ACTIVE_WINDOW"
+     c <- getAtom "WINDOW"
+     io $ changeProperty32 dpy r a c propModeReplace [fromIntegral w]
++    -- init _NET_WM_STATE to prevent gtk3 making apps look unfocused
++    a' <- getAtom "_NET_WM_STATE"
++    c' <- getAtom "ATOM"
++    io $ changeProperty32 dpy w a' c' propModeAppend []
diff --git a/xmonad-contrib-0.10-xft-fonts.patch b/xmonad-contrib-0.10-xft-fonts.patch
new file mode 100644
index 0000000..c763f2c
--- /dev/null
+++ b/xmonad-contrib-0.10-xft-fonts.patch
@@ -0,0 +1,36 @@
+diff -u xmonad-contrib-0.10/XMonad/Layout/Decoration.hs\~ xmonad-contrib-0.10/XMonad/Layout/Decoration.hs
+--- xmonad-contrib-0.10/XMonad/Layout/Decoration.hs~	2011-11-19 08:26:06.000000000 +0900
++++ xmonad-contrib-0.10/XMonad/Layout/Decoration.hs	2012-02-20 19:32:05.807316616 +0900
+@@ -98,7 +98,7 @@
+           , activeTextColor     = "#FFFFFF"
+           , inactiveTextColor   = "#BFBFBF"
+           , urgentTextColor     = "#FF0000"
+-          , fontName            = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
++          , fontName            = "xft:Sans:size=10"
+           , decoWidth           = 200
+           , decoHeight          = 20
+           , windowTitleAddons   = []
+diff -up xmonad-contrib-0.10/XMonad/Layout/ShowWName.hs~ xmonad-contrib-0.10/XMonad/Layout/ShowWName.hs
+--- xmonad-contrib-0.10/XMonad/Layout/ShowWName.hs~	2011-11-19 08:26:06.000000000 +0900
++++ xmonad-contrib-0.10/XMonad/Layout/ShowWName.hs	2012-02-21 18:50:48.586243032 +0900
+@@ -62,7 +62,7 @@ data SWNConfig =
+ 
+ defaultSWNConfig :: SWNConfig
+ defaultSWNConfig =
+-    SWNC { swn_font    = "-misc-fixed-*-*-*-*-20-*-*-*-*-*-*-*"
++    SWNC { swn_font    = "xft:Sans:size=20"
+          , swn_bgcolor = "black"
+          , swn_color   = "white"
+          , swn_fade    = 1
+diff -up xmonad-contrib-0.10/XMonad/Prompt.hs~ xmonad-contrib-0.10/XMonad/Prompt.hs
+--- xmonad-contrib-0.10/XMonad/Prompt.hs~	2011-11-19 08:26:06.000000000 +0900
++++ xmonad-contrib-0.10/XMonad/Prompt.hs	2012-02-21 18:54:03.643078084 +0900
+@@ -203,7 +203,7 @@ data XPPosition = Top
+ amberXPConfig, defaultXPConfig, greenXPConfig :: XPConfig
+ 
+ defaultXPConfig =
+-    XPC { font              = "-misc-fixed-*-*-*-*-12-*-*-*-*-*-*-*"
++    XPC { font              = "xft:Monospace:size=12"
+         , bgColor           = "grey22"
+         , fgColor           = "grey80"
+         , fgHLight          = "black"


More information about the scm-commits mailing list