xmonad-contrib: Update patches after migration to new version

Also, patch names has been updated to show respective
xmonad-contib version

Signed-off-by: Iurii Mykhalskyi <yriy.pma@gmail.com>
This commit is contained in:
Iurii Mykhalskyi 2022-06-03 17:29:57 +03:00 committed by Iurii Mykhalskyi
parent fc4cf2ef27
commit 48b2229150
7 changed files with 34 additions and 78 deletions

View File

@ -16,10 +16,8 @@ Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
Source1: https://hackage.haskell.org/package/%{pkgver}/%{pkg_name}.cabal#/%{pkgver}.cabal
# End cabal-rpm sources
Patch0: xmonad-contrib-use_xft-flag.patch
Patch1: xmonad-contrib-0.16-xft-fonts.patch
Patch2: xmonad-contrib-0.10-ewmh-set-NET_WM_STATE.patch
Patch4: xmonad-contrib-0.10-PositionStore-dont-rescale-with-screen.patch
Patch5: xmonad-contrib-0.11.2-xfce4-terminal.patch
Patch2: xmonad-contrib-0.17.0-ewmh-set-NET_WM_STATE.patch
Patch4: xmonad-contrib-0.17.0-PositionStore-dont-rescale-with-screen.patch
# Begin cabal-rpm deps:
BuildRequires: dos2unix
@ -95,10 +93,8 @@ This package provides the Haskell %{pkg_name} profiling library.
dos2unix -k -n %{SOURCE1} %{pkg_name}.cabal
# End cabal-rpm setup
%patch0 -p1 -b .orig-xft
%patch1 -p1 -b .orig-misc-fixed
%patch2 -p1 -b .orig-NET_WM_STATE
%patch4 -p1 -b .orig-rescale
%patch5 -p1 -b .orig-Terminal
%build

View File

@ -1,11 +0,0 @@
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 []

View File

@ -1,11 +0,0 @@
--- xmonad-contrib-0.11.2/XMonad/Config/Xfce.hs~ 2013-07-16 11:52:10.000000000 +0900
+++ xmonad-contrib-0.11.2/XMonad/Config/Xfce.hs 2013-11-26 13:16:20.023315724 +0900
@@ -35,7 +35,7 @@
-- For examples of how to further customize @xfceConfig@ see "XMonad.Config.Desktop".
xfceConfig = desktopConfig
- { terminal = "Terminal"
+ { terminal = "xfce4-terminal"
, keys = xfceKeys <+> keys desktopConfig }
xfceKeys (XConfig {modMask = modm}) = M.fromList $

View File

@ -1,36 +0,0 @@
diff -up xmonad-contrib-0.16/XMonad/Layout/Decoration.hs.orig-misc-fixed xmonad-contrib-0.16/XMonad/Layout/Decoration.hs
--- xmonad-contrib-0.16/XMonad/Layout/Decoration.hs.orig-misc-fixed 2020-06-10 17:28:41.733456236 +0800
+++ xmonad-contrib-0.16/XMonad/Layout/Decoration.hs 2020-06-10 17:35:05.219917789 +0800
@@ -103,7 +103,7 @@ instance Default Theme where
, 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.16/XMonad/Layout/ShowWName.hs.orig-misc-fixed xmonad-contrib-0.16/XMonad/Layout/ShowWName.hs
--- xmonad-contrib-0.16/XMonad/Layout/ShowWName.hs.orig-misc-fixed 2001-09-09 09:46:40.000000000 +0800
+++ xmonad-contrib-0.16/XMonad/Layout/ShowWName.hs 2020-06-10 17:28:41.734456256 +0800
@@ -63,7 +63,7 @@ data SWNConfig =
instance Default SWNConfig where
def =
- 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.16/XMonad/Prompt.hs.orig-misc-fixed xmonad-contrib-0.16/XMonad/Prompt.hs
--- xmonad-contrib-0.16/XMonad/Prompt.hs.orig-misc-fixed 2020-06-10 17:28:41.734456256 +0800
+++ xmonad-contrib-0.16/XMonad/Prompt.hs 2020-06-10 17:36:37.533715800 +0800
@@ -303,7 +303,7 @@ instance Default XPColor where
instance Default XPConfig where
def =
- XPC { font = "-misc-fixed-*-*-*-*-12-*-*-*-*-*-*-*"
+ XPC { font = "xft:Monospace:size=12"
, bgColor = bgNormal def
, fgColor = fgNormal def
, bgHLight = bgHighlight def

View File

@ -1,16 +1,17 @@
diff -rN -u old-XMonadContrib/XMonad/Util/PositionStore.hs new-XMonadContrib/XMonad/Util/PositionStore.hs
--- old-XMonadContrib/XMonad/Util/PositionStore.hs 2012-05-13 20:21:34.785720303 +0900
+++ new-XMonadContrib/XMonad/Util/PositionStore.hs 2012-05-13 20:21:34.814720213 +0900
@@ -36,7 +36,7 @@
diff --git a/XMonad/Util/PositionStore.hs b/XMonad/Util/PositionStore.hs
index f9f51e82..c9056e36 100644
--- a/XMonad/Util/PositionStore.hs
+++ b/XMonad/Util/PositionStore.hs
@@ -35,7 +35,7 @@ import qualified Data.Map as M
data PositionStore = PS (M.Map Window PosStoreRectangle)
deriving (Read,Show,Typeable)
newtype PositionStore = PS (M.Map Window PosStoreRectangle)
deriving (Read,Show)
-data PosStoreRectangle = PSRectangle Double Double Double Double
+data PosStoreRectangle = PSRectangle Double Double Dimension Dimension
deriving (Read,Show,Typeable)
deriving (Read,Show)
instance ExtensionClass PositionStore where
@@ -55,8 +55,7 @@
@@ -54,8 +54,7 @@ posStoreInsert (PS posStoreMap) w (Rectangle x y wh ht) (Rectangle srX srY srWh
offsetY = y - srY
in PS $ M.insert w (PSRectangle (fromIntegral offsetX / fromIntegral srWh)
(fromIntegral offsetY / fromIntegral srHt)
@ -20,7 +21,7 @@ diff -rN -u old-XMonadContrib/XMonad/Util/PositionStore.hs new-XMonadContrib/XMo
posStoreRemove :: PositionStore -> Window -> PositionStore
posStoreRemove (PS posStoreMap) w = PS $ M.delete w posStoreMap
@@ -64,12 +63,9 @@
@@ -63,12 +62,9 @@ posStoreRemove (PS posStoreMap) w = PS $ M.delete w posStoreMap
posStoreQuery :: PositionStore -> Window -> Rectangle -> Maybe Rectangle
posStoreQuery (PS posStoreMap) w (Rectangle srX srY srWh srHt) = do
(PSRectangle x y wh ht) <- M.lookup w posStoreMap

View File

@ -0,0 +1,15 @@
diff --git a/XMonad/Hooks/EwmhDesktops.hs b/XMonad/Hooks/EwmhDesktops.hs
index f6dd58ec..91409931 100644
--- a/XMonad/Hooks/EwmhDesktops.hs
+++ b/XMonad/Hooks/EwmhDesktops.hs
@@ -460,6 +460,10 @@ setActiveWindow w = withDisplay $ \dpy -> do
r <- asks theRoot
a <- getAtom "_NET_ACTIVE_WINDOW"
io $ changeProperty32 dpy r a wINDOW 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 []
setSupported :: X ()
setSupported = withDisplay $ \dpy -> do

View File

@ -1,10 +1,12 @@
--- xmonad-contrib-0.10/xmonad-contrib.cabal~ 2012-06-11 10:59:49.665575897 +0900
+++ xmonad-contrib-0.10/xmonad-contrib.cabal 2012-11-17 13:14:21.302802620 +0900
@@ -38,6 +38,7 @@
diff --git a/xmonad-contrib.cabal b/xmonad-contrib.cabal
index 4fd93927..ce1fce15 100644
--- a/xmonad-contrib.cabal
+++ b/xmonad-contrib.cabal
@@ -42,6 +42,7 @@ source-repository head
flag use_xft
description: Use Xft to render text
+ default: True
flag testing
description: Testing mode
flag pedantic
description: Be pedantic (-Werror and the like)