From f494c9ce349e83b080d11886b3ad8d35d6f92e27 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 11 Jun 2012 11:05:05 +0900 Subject: [PATCH 1/7] make PositionStore only rescale windows that are larger than new screen; allow X11-1.6 --- ghc-xmonad-contrib.spec | 11 +++++- ...sitionStore-dont-rescale-with-screen.patch | 37 +++++++++++++++++++ xmonad-contrib-0.10-X11-1.6.patch | 12 ++++++ 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 xmonad-contrib-0.10-PositionStore-dont-rescale-with-screen.patch create mode 100644 xmonad-contrib-0.10-X11-1.6.patch diff --git a/ghc-xmonad-contrib.spec b/ghc-xmonad-contrib.spec index 1e2f42a..ee30294 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: 4%{?dist} +Release: 5%{?dist} Summary: %{common_summary} Group: System Environment/Libraries @@ -47,6 +47,8 @@ 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 +Patch4: xmonad-contrib-0.10-PositionStore-dont-rescale-with-screen.patch +Patch5: xmonad-contrib-0.10-X11-1.6.patch %description %{common_description} @@ -57,6 +59,8 @@ Patch3: xmonad-contrib-0.10-BorderResize-smaller.patch %patch1 -p1 -b .orig-misc-fixed %patch2 -p1 -b .orig-NET_WM_STATE %patch3 -p1 -b .orig-mouseborder +%patch4 -p1 -b .orig-rescale +%patch5 -p1 -b .orig-X11 %build @@ -81,6 +85,11 @@ Patch3: xmonad-contrib-0.10-BorderResize-smaller.patch %changelog +* Sun May 13 2012 Jens Petersen - 0.10-5 +- patch XMonad.Util.PositionStore to not scale the size of windows + when changing screen unless the window is now larger than the monitor +- allow building with X11-1.6 + * Fri Mar 23 2012 Jens Petersen - 0.10-4 - add license to ghc_files diff --git a/xmonad-contrib-0.10-PositionStore-dont-rescale-with-screen.patch b/xmonad-contrib-0.10-PositionStore-dont-rescale-with-screen.patch new file mode 100644 index 0000000..96fb3c8 --- /dev/null +++ b/xmonad-contrib-0.10-PositionStore-dont-rescale-with-screen.patch @@ -0,0 +1,37 @@ +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 @@ + + data PositionStore = PS (M.Map Window PosStoreRectangle) + deriving (Read,Show,Typeable) +-data PosStoreRectangle = PSRectangle Double Double Double Double ++data PosStoreRectangle = PSRectangle Double Double Dimension Dimension + deriving (Read,Show,Typeable) + + instance ExtensionClass PositionStore where +@@ -55,8 +55,7 @@ + offsetY = y - srY + in PS $ M.insert w (PSRectangle (fromIntegral offsetX / fromIntegral srWh) + (fromIntegral offsetY / fromIntegral srHt) +- (fromIntegral wh / fromIntegral srWh) +- (fromIntegral ht / fromIntegral srHt)) posStoreMap ++ (min wh srWh) (min ht srHt)) posStoreMap + + posStoreRemove :: PositionStore -> Window -> PositionStore + posStoreRemove (PS posStoreMap) w = PS $ M.delete w posStoreMap +@@ -64,12 +63,9 @@ + 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 +- let realWh = fromIntegral srWh * wh +- realHt = fromIntegral srHt * ht +- realOffsetX = fromIntegral srWh * x ++ let realOffsetX = fromIntegral srWh * x + realOffsetY = fromIntegral srHt * y +- return (Rectangle (srX + round realOffsetX) (srY + round realOffsetY) +- (round realWh) (round realHt)) ++ return (Rectangle (srX + round realOffsetX) (srY + round realOffsetY) wh ht) + + posStoreMove :: PositionStore -> Window -> Position -> Position -> Rectangle -> Rectangle -> PositionStore + posStoreMove posStore w x y oldSr newSr = diff --git a/xmonad-contrib-0.10-X11-1.6.patch b/xmonad-contrib-0.10-X11-1.6.patch new file mode 100644 index 0000000..2bfa0da --- /dev/null +++ b/xmonad-contrib-0.10-X11-1.6.patch @@ -0,0 +1,12 @@ +diff -uxmonad-contrib-0.10/xmonad-contrib.cabal\~xmonad-contrib-0.10/xmonad-contrib.cabal +---xmonad-contrib-0.10/xmonad-contrib.cabal~ 2011-11-19 08:26:06.000000000 +0900 ++++xmonad-contrib-0.10/xmonad-contrib.cabal 2012-06-11 10:59:49.665575897 +0900 +@@ -61,7 +61,7 @@ + extensions: ForeignFunctionInterface + cpp-options: -DXFT + +- build-depends: mtl >= 1 && < 3, unix, X11>=1.5.0.0 && < 1.6, xmonad>=0.10, xmonad<0.11, utf8-string ++ build-depends: mtl >= 1 && < 3, unix, X11>=1.5.0.0 && < 1.7, xmonad>=0.10, xmonad<0.11, utf8-string + + if true + ghc-options: -fwarn-tabs -Wall From 72e37e5a110335d60a16575040dffd76b41153da Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 11 Jun 2012 11:13:59 +0900 Subject: [PATCH 2/7] fix xmonad-contrib-0.10-X11-1.6.patch --- xmonad-contrib-0.10-X11-1.6.patch | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xmonad-contrib-0.10-X11-1.6.patch b/xmonad-contrib-0.10-X11-1.6.patch index 2bfa0da..42227f7 100644 --- a/xmonad-contrib-0.10-X11-1.6.patch +++ b/xmonad-contrib-0.10-X11-1.6.patch @@ -1,6 +1,5 @@ -diff -uxmonad-contrib-0.10/xmonad-contrib.cabal\~xmonad-contrib-0.10/xmonad-contrib.cabal ----xmonad-contrib-0.10/xmonad-contrib.cabal~ 2011-11-19 08:26:06.000000000 +0900 -+++xmonad-contrib-0.10/xmonad-contrib.cabal 2012-06-11 10:59:49.665575897 +0900 +--- xmonad-contrib-0.10/xmonad-contrib.cabal~ 2011-11-19 08:26:06.000000000 +0900 ++++ xmonad-contrib-0.10/xmonad-contrib.cabal 2012-06-11 10:59:49.665575897 +0900 @@ -61,7 +61,7 @@ extensions: ForeignFunctionInterface cpp-options: -DXFT From 3edcb34f5838afd4bf90967d90390a7c03ad9976 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 11 Jun 2012 11:34:23 +0900 Subject: [PATCH 3/7] hide XMonad.Rotation from X11 in Spiral layout --- xmonad-contrib-0.10-X11-1.6.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xmonad-contrib-0.10-X11-1.6.patch b/xmonad-contrib-0.10-X11-1.6.patch index 42227f7..119949f 100644 --- a/xmonad-contrib-0.10-X11-1.6.patch +++ b/xmonad-contrib-0.10-X11-1.6.patch @@ -9,3 +9,15 @@ if true ghc-options: -fwarn-tabs -Wall +diff -u xmonad-contrib-0.10/XMonad/Layout/Spiral.hs\~ xmonad-contrib-0.10/XMonad/Layout/Spiral.hs +--- xmonad-contrib-0.10/XMonad/Layout/Spiral.hs~ 2011-11-19 08:26:06.000000000 +0900 ++++ xmonad-contrib-0.10/XMonad/Layout/Spiral.hs 2012-06-11 11:31:00.123639743 +0900 +@@ -26,7 +26,7 @@ + ) where + + import Data.Ratio +-import XMonad ++import XMonad hiding ( Rotation ) + import XMonad.StackSet ( integrate ) + + -- $usage From 4bc5643f00ed4c755fc90deda7b25fd00c2183d7 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 11 Jun 2012 11:52:34 +0900 Subject: [PATCH 4/7] Util.Paste no longer needs to define noModMask --- xmonad-contrib-0.10-X11-1.6.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xmonad-contrib-0.10-X11-1.6.patch b/xmonad-contrib-0.10-X11-1.6.patch index 119949f..a16ef9a 100644 --- a/xmonad-contrib-0.10-X11-1.6.patch +++ b/xmonad-contrib-0.10-X11-1.6.patch @@ -21,3 +21,15 @@ diff -u xmonad-contrib-0.10/XMonad/Layout/Spiral.hs\~ xmonad-contrib-0.10/XMonad import XMonad.StackSet ( integrate ) -- $usage +--- xmonad-contrib-0.10/XMonad/Util/Paste.hs~ 2011-11-19 08:26:06.000000000 +0900 ++++ xmonad-contrib-0.10/XMonad/Util/Paste.hs 2012-06-11 11:49:14.253451338 +0900 +@@ -89,9 +89,3 @@ + sendEvent d w True keyPressMask ev + setEventType ev keyRelease + sendEvent d w True keyReleaseMask ev +- +--- | A null 'KeyMask'. Used when you don't want a character or string shifted, control'd, or what. +--- +--- TODO: This really should be a function in the X11 binding. When noModMask shows up there, remove. +-noModMask :: KeyMask +-noModMask = 0 From 6ac3e9950c24fb62fbd006b661ade008e380db62 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 19 Jul 2012 01:24:05 -0500 Subject: [PATCH 5/7] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- ghc-xmonad-contrib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-xmonad-contrib.spec b/ghc-xmonad-contrib.spec index ee30294..fb037f1 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: 5%{?dist} +Release: 6%{?dist} Summary: %{common_summary} Group: System Environment/Libraries @@ -85,6 +85,9 @@ Patch5: xmonad-contrib-0.10-X11-1.6.patch %changelog +* Thu Jul 19 2012 Fedora Release Engineering - 0.10-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Sun May 13 2012 Jens Petersen - 0.10-5 - patch XMonad.Util.PositionStore to not scale the size of windows when changing screen unless the window is now larger than the monitor From 46bdfc699e1c08b6ca8126da0ae3e3e4e2438558 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 17 Nov 2012 13:39:23 +0900 Subject: [PATCH 6/7] add upstream ICCCMFocus patch for WM_TAKE_FOCUS move to core (#874855) - use a patch for use_xft flag - update packaging with cabal-rpm --- ghc-xmonad-contrib.spec | 36 +++++++++++-------- xmonad-contrib-0.10-takeFocus-core.patch | 45 ++++++++++++++++++++++++ xmonad-contrib-use_xft-flag.patch | 10 ++++++ 3 files changed, 76 insertions(+), 15 deletions(-) create mode 100644 xmonad-contrib-0.10-takeFocus-core.patch create mode 100644 xmonad-contrib-use_xft-flag.patch diff --git a/ghc-xmonad-contrib.spec b/ghc-xmonad-contrib.spec index fb037f1..07e5ea9 100644 --- a/ghc-xmonad-contrib.spec +++ b/ghc-xmonad-contrib.spec @@ -1,4 +1,3 @@ -# cabal2spec-0.25.2 # https://fedoraproject.org/wiki/Packaging:Haskell # https://fedoraproject.org/wiki/PackagingDrafts/Haskell @@ -19,19 +18,25 @@ your own extensions. Name: ghc-%{pkg_name} Version: 0.10 -Release: 6%{?dist} +Release: 7%{?dist} Summary: %{common_summary} -Group: System Environment/Libraries License: BSD -# BEGIN cabal2spec URL: http://hackage.haskell.org/package/%{pkg_name} Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz -ExclusiveArch: %{ghc_arches} -BuildRequires: ghc-Cabal-devel -BuildRequires: ghc-rpm-macros %{!?without_hscolour:hscolour} -# END cabal2spec +Patch0: xmonad-contrib-use_xft-flag.patch +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 +Patch4: xmonad-contrib-0.10-PositionStore-dont-rescale-with-screen.patch +Patch5: xmonad-contrib-0.10-X11-1.6.patch +Patch6: xmonad-contrib-0.10-takeFocus-core.patch +BuildRequires: ghc-Cabal-devel +BuildRequires: ghc-rpm-macros +# Begin cabal-rpm deps: +BuildRequires: ghc-X11-devel +BuildRequires: ghc-X11-xft-devel BuildRequires: ghc-containers-devel BuildRequires: ghc-directory-devel BuildRequires: ghc-extensible-exceptions-devel @@ -42,13 +47,8 @@ BuildRequires: ghc-process-devel BuildRequires: ghc-random-devel 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 -Patch4: xmonad-contrib-0.10-PositionStore-dont-rescale-with-screen.patch -Patch5: xmonad-contrib-0.10-X11-1.6.patch +# End cabal-rpm deps %description %{common_description} @@ -56,15 +56,16 @@ Patch5: xmonad-contrib-0.10-X11-1.6.patch %prep %setup -q -n %{pkg_name}-%{version} +%patch0 -p1 -b .orig-xft %patch1 -p1 -b .orig-misc-fixed %patch2 -p1 -b .orig-NET_WM_STATE %patch3 -p1 -b .orig-mouseborder %patch4 -p1 -b .orig-rescale %patch5 -p1 -b .orig-X11 +%patch6 -p1 -b .orig-Focus %build -%define cabal_configure_options -f use_xft %ghc_lib_build @@ -85,6 +86,11 @@ Patch5: xmonad-contrib-0.10-X11-1.6.patch %changelog +* Sat Nov 17 2012 Jens Petersen - 0.10-7 +- add ICCCMFocus patch from upstream for WM_TAKE_FOCUS move to core (#874855) +- use a patch for use_xft flag +- update packaging with cabal-rpm + * Thu Jul 19 2012 Fedora Release Engineering - 0.10-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild diff --git a/xmonad-contrib-0.10-takeFocus-core.patch b/xmonad-contrib-0.10-takeFocus-core.patch new file mode 100644 index 0000000..bc69917 --- /dev/null +++ b/xmonad-contrib-0.10-takeFocus-core.patch @@ -0,0 +1,45 @@ +Thu Nov 8 14:57:16 PST 2012 Adam Vogt + * Gut H.ICCCMFocus: issue 177 has been merged in core. + + Keep the module for now: the LG3D bit might still be useful + and there's no need to break configs unnecessarily. +diff -rN -u old-XMonadContrib/XMonad/Hooks/ICCCMFocus.hs new-XMonadContrib/XMonad/Hooks/ICCCMFocus.hs +--- old-XMonadContrib/XMonad/Hooks/ICCCMFocus.hs 2012-11-14 23:07:15.699051848 -0800 ++++ new-XMonadContrib/XMonad/Hooks/ICCCMFocus.hs 2012-11-14 23:07:15.982052555 -0800 +@@ -18,6 +18,7 @@ + -- @ + ----------------------------------------------------------------------------- + module XMonad.Hooks.ICCCMFocus ++{-# DEPRECATED "XMonad.Hooks.ICCCMFocus: xmonad>0.10 core merged issue 177" #-} + ( + atom_WM_TAKE_FOCUS + , takeFocusX +@@ -27,27 +28,11 @@ + import XMonad + import XMonad.Hooks.SetWMName + import qualified XMonad.StackSet as W +-import Control.Monad +- +-atom_WM_TAKE_FOCUS :: +- X Atom +-atom_WM_TAKE_FOCUS = +- getAtom "WM_TAKE_FOCUS" + + takeFocusX :: + Window + -> X () +-takeFocusX w = +- withWindowSet . const $ do +- dpy <- asks display +- wmtakef <- atom_WM_TAKE_FOCUS +- wmprot <- atom_WM_PROTOCOLS +- protocols <- io $ getWMProtocols dpy w +- when (wmtakef `elem` protocols) $ +- io . allocaXEvent $ \ev -> do +- setEventType ev clientMessage +- setClientMessageEvent ev w wmprot 32 wmtakef currentTime +- sendEvent dpy w False noEventMask ev ++takeFocusX _w = return () + + -- | The value to add to your log hook configuration. + takeTopFocus :: diff --git a/xmonad-contrib-use_xft-flag.patch b/xmonad-contrib-use_xft-flag.patch new file mode 100644 index 0000000..90b9bfc --- /dev/null +++ b/xmonad-contrib-use_xft-flag.patch @@ -0,0 +1,10 @@ +--- 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 @@ + + flag use_xft + description: Use Xft to render text ++ default: True + + flag testing + description: Testing mode From 9903afa2b4d8242f14be1780c7f7141ca2dd391c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 17 Nov 2012 13:55:02 +0900 Subject: [PATCH 7/7] condition X11-1.6 patch to fedora >= 18 --- ghc-xmonad-contrib.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ghc-xmonad-contrib.spec b/ghc-xmonad-contrib.spec index 07e5ea9..40347c1 100644 --- a/ghc-xmonad-contrib.spec +++ b/ghc-xmonad-contrib.spec @@ -61,7 +61,9 @@ BuildRequires: ghc-xmonad-devel %patch2 -p1 -b .orig-NET_WM_STATE %patch3 -p1 -b .orig-mouseborder %patch4 -p1 -b .orig-rescale +%if 0%{?fedora} >= 18 %patch5 -p1 -b .orig-X11 +%endif %patch6 -p1 -b .orig-Focus @@ -89,6 +91,7 @@ BuildRequires: ghc-xmonad-devel * Sat Nov 17 2012 Jens Petersen - 0.10-7 - add ICCCMFocus patch from upstream for WM_TAKE_FOCUS move to core (#874855) - use a patch for use_xft flag +- condition X11-1.6 patch to fedora >= 18 - update packaging with cabal-rpm * Thu Jul 19 2012 Fedora Release Engineering - 0.10-6