[arch-commits] Commit in xmonad/repos (14 files)
Jelle van der Waa
jelle at archlinux.org
Wed Jan 18 19:47:30 UTC 2017
Date: Wednesday, January 18, 2017 @ 19:47:29
Author: jelle
Revision: 207913
archrelease: copy trunk to community-i686, community-x86_64
Added:
xmonad/repos/community-i686/202e239ea48d56882bb4ad226ad3a4042ebf12bd.patch
(from rev 207912, xmonad/trunk/202e239ea48d56882bb4ad226ad3a4042ebf12bd.patch)
xmonad/repos/community-i686/PKGBUILD
(from rev 207912, xmonad/trunk/PKGBUILD)
xmonad/repos/community-i686/dc078490d0c244af1d0d5370799b83f42dcb7d43.patch
(from rev 207912, xmonad/trunk/dc078490d0c244af1d0d5370799b83f42dcb7d43.patch)
xmonad/repos/community-i686/xmonad.svg
(from rev 207912, xmonad/trunk/xmonad.svg)
xmonad/repos/community-x86_64/202e239ea48d56882bb4ad226ad3a4042ebf12bd.patch
(from rev 207912, xmonad/trunk/202e239ea48d56882bb4ad226ad3a4042ebf12bd.patch)
xmonad/repos/community-x86_64/PKGBUILD
(from rev 207912, xmonad/trunk/PKGBUILD)
xmonad/repos/community-x86_64/dc078490d0c244af1d0d5370799b83f42dcb7d43.patch
(from rev 207912, xmonad/trunk/dc078490d0c244af1d0d5370799b83f42dcb7d43.patch)
xmonad/repos/community-x86_64/xmonad.svg
(from rev 207912, xmonad/trunk/xmonad.svg)
Deleted:
xmonad/repos/community-i686/PKGBUILD
xmonad/repos/community-i686/x11.patch
xmonad/repos/community-i686/xmonad.svg
xmonad/repos/community-x86_64/PKGBUILD
xmonad/repos/community-x86_64/x11.patch
xmonad/repos/community-x86_64/xmonad.svg
-----------------------------------------------------------------+
/PKGBUILD | 128 +++++++
/xmonad.svg | 154 ++++++++
community-i686/202e239ea48d56882bb4ad226ad3a4042ebf12bd.patch | 79 ++++
community-i686/PKGBUILD | 61 ---
community-i686/dc078490d0c244af1d0d5370799b83f42dcb7d43.patch | 179 ++++++++++
community-i686/x11.patch | 12
community-i686/xmonad.svg | 77 ----
community-x86_64/202e239ea48d56882bb4ad226ad3a4042ebf12bd.patch | 79 ++++
community-x86_64/PKGBUILD | 61 ---
community-x86_64/dc078490d0c244af1d0d5370799b83f42dcb7d43.patch | 179 ++++++++++
community-x86_64/x11.patch | 12
community-x86_64/xmonad.svg | 77 ----
12 files changed, 798 insertions(+), 300 deletions(-)
Copied: xmonad/repos/community-i686/202e239ea48d56882bb4ad226ad3a4042ebf12bd.patch (from rev 207912, xmonad/trunk/202e239ea48d56882bb4ad226ad3a4042ebf12bd.patch)
===================================================================
--- community-i686/202e239ea48d56882bb4ad226ad3a4042ebf12bd.patch (rev 0)
+++ community-i686/202e239ea48d56882bb4ad226ad3a4042ebf12bd.patch 2017-01-18 19:47:29 UTC (rev 207913)
@@ -0,0 +1,79 @@
+From 202e239ea48d56882bb4ad226ad3a4042ebf12bd Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones at devalot.com>
+Date: Tue, 22 Nov 2016 18:46:28 -0700
+Subject: [PATCH] Refactor xmonad/xmonad#9 and remove explicit exception
+ handling
+
+---
+ src/XMonad/Operations.hs | 23 +++++++++++++++++++++--
+ xmonad.cabal | 2 +-
+ 2 files changed, 22 insertions(+), 3 deletions(-)
+
+diff --git a/src/XMonad/Operations.hs b/src/XMonad/Operations.hs
+index 153b5a2..cd33974 100644
+--- a/src/XMonad/Operations.hs
++++ b/src/XMonad/Operations.hs
+@@ -34,6 +34,7 @@ import Control.Monad.Reader
+ import Control.Monad.State
+ import qualified Control.Exception.Extensible as C
+
++import System.IO
+ import System.Posix.Process (executeFile)
+ import Graphics.X11.Xlib
+ import Graphics.X11.Xinerama (getScreenInfo)
+@@ -111,7 +112,10 @@ windows f = do
+
+ mapM_ setInitialProperties newwindows
+
+- whenJust (W.peek old) $ \otherw -> io $ setWindowBorder d otherw nbc
++ whenJust (W.peek old) $ \otherw -> do
++ nbs <- asks (normalBorderColor . config)
++ setWindowBorderWithFallback d otherw nbs nbc
++
+ modify (\s -> s { windowset = ws })
+
+ -- notify non visibility
+@@ -151,7 +155,9 @@ windows f = do
+
+ mapM_ (uncurry tileWindow) rects
+
+- whenJust (W.peek ws) $ \w -> io $ setWindowBorder d w fbc
++ whenJust (W.peek ws) $ \w -> do
++ fbs <- asks (focusedBorderColor . config)
++ setWindowBorderWithFallback d w fbs fbc
+
+ mapM_ reveal visible
+ setTopFocus
+@@ -181,6 +187,19 @@ setWMState w v = withDisplay $ \dpy -> do
+ a <- atom_WM_STATE
+ io $ changeProperty32 dpy w a a propModeReplace [fromIntegral v, fromIntegral none]
+
++-- | Set the border color using the window's color map, if possible,
++-- otherwise use fallback.
++setWindowBorderWithFallback :: Display -> Window -> String -> Pixel -> X ()
++setWindowBorderWithFallback dpy w color basic = io $
++ C.handle fallback $ do
++ wa <- getWindowAttributes dpy w
++ pixel <- color_pixel . fst <$> allocNamedColor dpy (wa_colormap wa) color
++ setWindowBorder dpy w pixel
++ where
++ fallback :: C.SomeException -> IO ()
++ fallback e = do hPrint stderr e >> hFlush stderr
++ setWindowBorder dpy w basic
++
+ -- | hide. Hide a window by unmapping it, and setting Iconified.
+ hide :: Window -> X ()
+ hide w = whenX (gets (S.member w . mapped)) $ withDisplay $ \d -> do
+diff --git a/xmonad.cabal b/xmonad.cabal
+index 0de4277..ed77fe7 100644
+--- a/xmonad.cabal
++++ b/xmonad.cabal
+@@ -78,7 +78,7 @@ library
+ process,
+ unix,
+ utf8-string >= 0.3 && < 1.1,
+- X11>=1.5 && < 1.7
++ X11>=1.7 && < 1.8
+
+ if true
+ ghc-options: -funbox-strict-fields -Wall
Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD 2017-01-18 19:47:15 UTC (rev 207912)
+++ community-i686/PKGBUILD 2017-01-18 19:47:29 UTC (rev 207913)
@@ -1,61 +0,0 @@
-# $Id$
-# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
-# Maintainer: Vesa Kaihlavirta <vegai at iki.fi>
-# Maintainer: Jelle van der Waa <jelle at archlinux.org>
-# Contributor: shild <shildv at gmail.com>
-
-pkgname=xmonad
-pkgver=0.12
-pkgrel=11
-pkgdesc="Lightweight X11 tiled window manager written in Haskell"
-arch=('i686' 'x86_64')
-url="http://xmonad.org/"
-license=('BSD')
-depends=('ghc=8.0.1' 'gmp' 'haskell-x11=1.7' 'sh' 'haskell-mtl=2.2.1'
- 'haskell-utf8-string' 'haskell-extensible-exceptions=0.1.1.4'
- 'haskell-data-default' 'haskell-setlocale')
-makedepends=('gendesk')
-optdepends=('xorg-xmessage: for displaying visual error messages')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/xmonad/xmonad/archive/v${pkgver}.tar.gz"
- "xmonad.svg" "x11.patch")
-
-md5sums=('c81d688c51fa50aea0e421f4755ee2fc'
- '72bfa5e62e4e44fe7fa59b6a7593d993'
- '0209d1b5c47ad765b2143046874fa247')
-
-prepare() {
- gendesk --pkgname "$pkgname" --pkgdesc "$pkgdesc"
-
- cd $srcdir/$pkgname-$pkgver
- patch -Np1 -i $srcdir/x11.patch
-}
-
-build() {
- cd $srcdir/$pkgname-$pkgver
-
- runhaskell Setup.lhs configure --ghc --enable-shared --enable-split-objs --prefix=/usr \
- --libsubdir=\$compiler/site-local/\$pkgid --docdir=/usr/share/doc/${pkgname}
- runhaskell Setup build
- runhaskell Setup haddock
- runhaskell Setup register --gen-script
- runhaskell Setup unregister --gen-script
- sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
- sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- install -D -m744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
- install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
-
- runhaskell Setup.lhs copy --destdir=$pkgdir
-
- # Requires pandoc, regex-posix, Pretty and cabal
- #runhaskell util/GenerateManpage.hs
-
- install -D -m644 man/xmonad.1 $pkgdir/usr/share/man/man1/xmonad.1
- install -D -m644 LICENSE $pkgdir/usr/share/licenses/xmonad/LICENSE
- install -D -m644 $srcdir/xmonad.svg $pkgdir/usr/share/pixmaps/xmonad.svg
- install -D -m644 $srcdir/xmonad.desktop $pkgdir/usr/share/xsessions/xmonad.desktop
-}
Copied: xmonad/repos/community-i686/PKGBUILD (from rev 207912, xmonad/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD (rev 0)
+++ community-i686/PKGBUILD 2017-01-18 19:47:29 UTC (rev 207913)
@@ -0,0 +1,64 @@
+# $Id$
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Maintainer: Vesa Kaihlavirta <vegai at iki.fi>
+# Maintainer: Jelle van der Waa <jelle at archlinux.org>
+# Contributor: shild <shildv at gmail.com>
+
+pkgname=xmonad
+pkgver=0.12
+pkgrel=12
+pkgdesc="Lightweight X11 tiled window manager written in Haskell"
+arch=('i686' 'x86_64')
+url="http://xmonad.org/"
+license=('BSD')
+depends=('ghc=8.0.1' 'gmp' 'haskell-x11=1.7' 'sh' 'haskell-mtl=2.2.1'
+ 'haskell-utf8-string' 'haskell-extensible-exceptions=0.1.1.4'
+ 'haskell-data-default' 'haskell-setlocale')
+makedepends=('gendesk')
+optdepends=('xorg-xmessage: for displaying visual error messages')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/xmonad/xmonad/archive/v${pkgver}.tar.gz"
+ "xmonad.svg" "202e239ea48d56882bb4ad226ad3a4042ebf12bd.patch"
+ "dc078490d0c244af1d0d5370799b83f42dcb7d43.patch")
+
+md5sums=('c81d688c51fa50aea0e421f4755ee2fc'
+ '72bfa5e62e4e44fe7fa59b6a7593d993'
+ '18242b7792e06d63866e06821396220b'
+ '5e7c2833126b8c6658586ca4b647ac6f')
+
+prepare() {
+ gendesk --pkgname "$pkgname" --pkgdesc "$pkgdesc"
+
+ cd $srcdir/$pkgname-$pkgver
+ patch -Np1 -i "$srcdir/202e239ea48d56882bb4ad226ad3a4042ebf12bd.patch"
+ patch -Np1 -i "$srcdir/dc078490d0c244af1d0d5370799b83f42dcb7d43.patch"
+}
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+
+ runhaskell Setup.lhs configure --ghc --enable-shared --enable-split-objs --prefix=/usr \
+ --libsubdir=\$compiler/site-local/\$pkgid --docdir=/usr/share/doc/${pkgname}
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ install -D -m744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
+ install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
+
+ runhaskell Setup.lhs copy --destdir=$pkgdir
+
+ # Requires pandoc, regex-posix, Pretty and cabal
+ #runhaskell util/GenerateManpage.hs
+
+ install -D -m644 man/xmonad.1 $pkgdir/usr/share/man/man1/xmonad.1
+ install -D -m644 LICENSE $pkgdir/usr/share/licenses/xmonad/LICENSE
+ install -D -m644 $srcdir/xmonad.svg $pkgdir/usr/share/pixmaps/xmonad.svg
+ install -D -m644 $srcdir/xmonad.desktop $pkgdir/usr/share/xsessions/xmonad.desktop
+}
Copied: xmonad/repos/community-i686/dc078490d0c244af1d0d5370799b83f42dcb7d43.patch (from rev 207912, xmonad/trunk/dc078490d0c244af1d0d5370799b83f42dcb7d43.patch)
===================================================================
--- community-i686/dc078490d0c244af1d0d5370799b83f42dcb7d43.patch (rev 0)
+++ community-i686/dc078490d0c244af1d0d5370799b83f42dcb7d43.patch 2017-01-18 19:47:29 UTC (rev 207913)
@@ -0,0 +1,179 @@
+From dc078490d0c244af1d0d5370799b83f42dcb7d43 Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones at devalot.com>
+Date: Wed, 23 Nov 2016 16:30:27 -0700
+Subject: [PATCH] Guard most calls to getWindowAttributes since it may throw an
+ exception
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This is a continuation of the work done by Adam Sjøgren (@asjo) to
+resolve an issue where RGBA windows have transparent borders. It also
+fixes bugs related to windows suddenly disappearing right before
+xmonad calls getWindowAttributes.
+
+For more information see xmonad/xmonad#9
+---
+ src/XMonad/Core.hs | 11 +++++++++--
+ src/XMonad/Main.hs | 18 ++++++++++--------
+ src/XMonad/Operations.hs | 37 ++++++++++++++++++++++---------------
+ 3 files changed, 41 insertions(+), 25 deletions(-)
+
+diff --git a/src/XMonad/Core.hs b/src/XMonad/Core.hs
+index a6387fd..3a96954 100644
+--- a/src/XMonad/Core.hs
++++ b/src/XMonad/Core.hs
+@@ -26,7 +26,8 @@ module XMonad.Core (
+ runX, catchX, userCode, userCodeDef, io, catchIO, installSignalHandlers, uninstallSignalHandlers,
+ withDisplay, withWindowSet, isRoot, runOnWorkspaces,
+ getAtom, spawn, spawnPID, xfork, getXMonadDir, recompile, trace, whenJust, whenX,
+- atom_WM_STATE, atom_WM_PROTOCOLS, atom_WM_DELETE_WINDOW, atom_WM_TAKE_FOCUS, ManageHook, Query(..), runQuery
++ atom_WM_STATE, atom_WM_PROTOCOLS, atom_WM_DELETE_WINDOW, atom_WM_TAKE_FOCUS, withWindowAttributes,
++ ManageHook, Query(..), runQuery
+ ) where
+
+ import XMonad.StackSet hiding (modify)
+@@ -49,7 +50,7 @@ import System.Process
+ import System.Directory
+ import System.Exit
+ import Graphics.X11.Xlib
+-import Graphics.X11.Xlib.Extras (Event)
++import Graphics.X11.Xlib.Extras (getWindowAttributes, WindowAttributes, Event)
+ import Data.Typeable
+ import Data.List ((\\))
+ import Data.Maybe (isJust,fromMaybe)
+@@ -207,6 +208,12 @@ withDisplay f = asks display >>= f
+ withWindowSet :: (WindowSet -> X a) -> X a
+ withWindowSet f = gets windowset >>= f
+
++-- | Safely access window attributes.
++withWindowAttributes :: Display -> Window -> (WindowAttributes -> X ()) -> X ()
++withWindowAttributes dpy win f = do
++ wa <- userCode (io $ getWindowAttributes dpy win)
++ catchX (whenJust wa f) (return ())
++
+ -- | True if the given window is the root window
+ isRoot :: Window -> X Bool
+ isRoot w = (w==) <$> asks theRoot
+diff --git a/src/XMonad/Main.hs b/src/XMonad/Main.hs
+index 3da7bb4..57c13c8 100644
+--- a/src/XMonad/Main.hs
++++ b/src/XMonad/Main.hs
+@@ -17,6 +17,7 @@ module XMonad.Main (xmonad) where
+
+ import System.Locale.SetLocale
+ import Control.Arrow (second)
++import qualified Control.Exception.Extensible as E
+ import Data.Bits
+ import Data.List ((\\))
+ import Data.Function
+@@ -290,10 +291,10 @@ handle (KeyEvent {ev_event_type = t, ev_state = m, ev_keycode = code})
+
+ -- manage a new window
+ handle (MapRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do
+- wa <- io $ getWindowAttributes dpy w -- ignore override windows
+- -- need to ignore mapping requests by managed windows not on the current workspace
+- managed <- isClient w
+- when (not (wa_override_redirect wa) && not managed) $ do manage w
++ withWindowAttributes dpy w $ \wa -> do -- ignore override windows
++ -- need to ignore mapping requests by managed windows not on the current workspace
++ managed <- isClient w
++ when (not (wa_override_redirect wa) && not managed) $ manage w
+
+ -- window destroyed, unmanage it
+ -- window gone, unmanage it
+@@ -367,8 +368,6 @@ handle e@(CrossingEvent {ev_event_type = t})
+ -- configure a window
+ handle e@(ConfigureRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do
+ ws <- gets windowset
+- wa <- io $ getWindowAttributes dpy w
+-
+ bw <- asks (borderWidth . config)
+
+ if M.member w (floating ws)
+@@ -382,7 +381,7 @@ handle e@(ConfigureRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do
+ , wc_sibling = ev_above e
+ , wc_stack_mode = ev_detail e }
+ when (member w ws) (float w)
+- else io $ allocaXEvent $ \ev -> do
++ else withWindowAttributes dpy w $ \wa -> io $ allocaXEvent $ \ev -> do
+ setEventType ev configureNotify
+ setConfigureEvent ev w w
+ (wa_x wa) (wa_y wa) (wa_width wa)
+@@ -416,7 +415,7 @@ handle e = broadcastMessage e -- trace (eventName e) -- ignoring
+ scan :: Display -> Window -> IO [Window]
+ scan dpy rootw = do
+ (_, _, ws) <- queryTree dpy rootw
+- filterM ok ws
++ filterM (\w -> ok w `E.catch` skip) ws
+ -- TODO: scan for windows that are either 'IsViewable' or where WM_STATE ==
+ -- Iconic
+ where ok w = do wa <- getWindowAttributes dpy w
+@@ -428,6 +427,9 @@ scan dpy rootw = do
+ return $ not (wa_override_redirect wa)
+ && (wa_map_state wa == waIsViewable || ic)
+
++ skip :: E.SomeException -> IO Bool
++ skip _ = return False
++
+ setNumlockMask :: X ()
+ setNumlockMask = do
+ dpy <- asks display
+diff --git a/src/XMonad/Operations.hs b/src/XMonad/Operations.hs
+index cd33974..390f553 100644
+--- a/src/XMonad/Operations.hs
++++ b/src/XMonad/Operations.hs
+@@ -252,10 +252,10 @@ clearEvents mask = withDisplay $ \d -> io $ do
+ -- | tileWindow. Moves and resizes w such that it fits inside the given
+ -- rectangle, including its border.
+ tileWindow :: Window -> Rectangle -> X ()
+-tileWindow w r = withDisplay $ \d -> do
+- bw <- (fromIntegral . wa_border_width) <$> io (getWindowAttributes d w)
++tileWindow w r = withDisplay $ \d -> withWindowAttributes d w $ \wa -> do
+ -- give all windows at least 1x1 pixels
+- let least x | x <= bw*2 = 1
++ let bw = fromIntegral $ wa_border_width wa
++ least x | x <= bw*2 = 1
+ | otherwise = x - bw*2
+ io $ moveResizeWindow d w (rect_x r) (rect_y r)
+ (least $ rect_width r) (least $ rect_height r)
+@@ -463,20 +463,27 @@ restart prog resume = do
+ -- | Given a window, find the screen it is located on, and compute
+ -- the geometry of that window wrt. that screen.
+ floatLocation :: Window -> X (ScreenId, W.RationalRect)
+-floatLocation w = withDisplay $ \d -> do
+- ws <- gets windowset
+- wa <- io $ getWindowAttributes d w
+- let bw = (fromIntegral . wa_border_width) wa
+- sc <- fromMaybe (W.current ws) <$> pointScreen (fi $ wa_x wa) (fi $ wa_y wa)
+-
+- let sr = screenRect . W.screenDetail $ sc
+- rr = W.RationalRect ((fi (wa_x wa) - fi (rect_x sr)) % fi (rect_width sr))
+- ((fi (wa_y wa) - fi (rect_y sr)) % fi (rect_height sr))
+- (fi (wa_width wa + bw*2) % fi (rect_width sr))
+- (fi (wa_height wa + bw*2) % fi (rect_height sr))
++floatLocation w =
++ catchX go $ do
++ -- Fallback solution if `go' fails. Which it might, since it
++ -- calls `getWindowAttributes'.
++ sc <- W.current <$> gets windowset
++ return (W.screen sc, W.RationalRect 0 0 1 1)
+
+- return (W.screen sc, rr)
+ where fi x = fromIntegral x
++ go = withDisplay $ \d -> do
++ ws <- gets windowset
++ wa <- io $ getWindowAttributes d w
++ let bw = (fromIntegral . wa_border_width) wa
++ sc <- fromMaybe (W.current ws) <$> pointScreen (fi $ wa_x wa) (fi $ wa_y wa)
++
++ let sr = screenRect . W.screenDetail $ sc
++ rr = W.RationalRect ((fi (wa_x wa) - fi (rect_x sr)) % fi (rect_width sr))
++ ((fi (wa_y wa) - fi (rect_y sr)) % fi (rect_height sr))
++ (fi (wa_width wa + bw*2) % fi (rect_width sr))
++ (fi (wa_height wa + bw*2) % fi (rect_height sr))
++
++ return (W.screen sc, rr)
+
+ -- | Given a point, determine the screen (if any) that contains it.
+ pointScreen :: Position -> Position
Deleted: community-i686/x11.patch
===================================================================
--- community-i686/x11.patch 2017-01-18 19:47:15 UTC (rev 207912)
+++ community-i686/x11.patch 2017-01-18 19:47:29 UTC (rev 207913)
@@ -1,12 +0,0 @@
-diff -aur xmonad-0.12/xmonad.cabal xmonad-0.12.new/xmonad.cabal
---- xmonad-0.12/xmonad.cabal 2015-12-18 21:23:38.000000000 +0100
-+++ xmonad-0.12.new/xmonad.cabal 2017-01-08 12:08:19.195824197 +0100
-@@ -71,7 +71,7 @@
- process,
- unix,
- utf8-string >= 0.3 && < 1.1,
-- X11>=1.5 && < 1.7
-+ X11>=1.5 && < 1.8
-
- if true
- ghc-options: -funbox-strict-fields -Wall
Deleted: community-i686/xmonad.svg
===================================================================
--- community-i686/xmonad.svg 2017-01-18 19:47:15 UTC (rev 207912)
+++ community-i686/xmonad.svg 2017-01-18 19:47:29 UTC (rev 207913)
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- id="svg2211"
- sodipodi:version="0.32"
- inkscape:version="0.45.1"
- width="47"
- height="73"
- version="1.0"
- sodipodi:docbase="/home/sjanssen/xmonad-web/images"
- sodipodi:docname="logo.svg"
- inkscape:output_extension="org.inkscape.output.svg.inkscape"
- inkscape:export-filename="/home/sjanssen/xmonad-web/images/logo.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <metadata
- id="metadata2216">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs2214" />
- <sodipodi:namedview
- inkscape:window-height="778"
- inkscape:window-width="1278"
- inkscape:pageshadow="2"
- inkscape:pageopacity="1"
- guidetolerance="10.0"
- gridtolerance="10.0"
- objecttolerance="10.0"
- borderopacity="1.0"
- bordercolor="#666666"
- pagecolor="#ffffff"
- id="base"
- inkscape:zoom="4"
- inkscape:cx="23.5"
- inkscape:cy="22.689137"
- inkscape:window-x="0"
- inkscape:window-y="20"
- inkscape:current-layer="g3208" />
- <g
- id="g3208"
- transform="translate(-44.517797,4.0967298)">
- <g
- id="g3212"
- transform="matrix(1.0216109,0,0,1.0127041,45.533715,-4.3577662)">
- <path
- style="font-size:73.7244339px;font-style:normal;font-weight:normal;fill:#aeaeae;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- d="M 22.62043,20.307707 L 36.04778,0.32867349 L 43.859402,0.32867349 L 26.580238,26.139425 L 22.080456,31.215179 L 6.8531925,54.074074 L -0.9944279,54.074074 L 18.192644,25.383462"
- id="text2220"
- sodipodi:nodetypes="cccccccc" />
- <path
- id="path3206"
- d="M 1.4534537,0.32867349 L 9.2650758,0.32867349 L 45.011347,54.074074 L 37.199725,54.074074 L 22.080456,31.215179 L 6.8531925,54.074074 L -0.9944279,54.074074 L 18.192644,25.383462 L 1.4534537,0.32867349"
- style="font-size:73.7244339px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- sodipodi:nodetypes="ccccccccc" />
- </g>
- <path
- style="font-size:28.207407px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ee0a00;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans Mono"
- d="M 44.517797,65.480602 L 55.836194,59.828049 L 44.517797,54.228655 L 44.517797,51.056847 L 58.809298,58.321883 L 58.809298,61.298776 L 44.517797,68.652411 M 44.517797,68.652411 L 44.517797,65.480602 M 73.929389,61.298776 L 59.637889,68.652411 L 59.637889,65.480602 L 70.956287,59.828049 L 59.637889,54.228655 L 59.637889,51.056847 L 73.929389,58.321883 L 73.929389,61.298776 z M 91.517797,57.382744 L 77.270452,57.382744 L 77.270452,54.405851 L 91.517797,54.405851 L 91.517797,57.382744 z M 91.517797,65.267967 L 77.270452,65.267967 L 77.270452,62.291073 L 91.517797,62.291073 L 91.517797,65.267967 z "
- id="text3216"
- sodipodi:nodetypes="ccccccccccccccccccccccccccc" />
- </g>
-</svg>
Copied: xmonad/repos/community-i686/xmonad.svg (from rev 207912, xmonad/trunk/xmonad.svg)
===================================================================
--- community-i686/xmonad.svg (rev 0)
+++ community-i686/xmonad.svg 2017-01-18 19:47:29 UTC (rev 207913)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg2211"
+ sodipodi:version="0.32"
+ inkscape:version="0.45.1"
+ width="47"
+ height="73"
+ version="1.0"
+ sodipodi:docbase="/home/sjanssen/xmonad-web/images"
+ sodipodi:docname="logo.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ inkscape:export-filename="/home/sjanssen/xmonad-web/images/logo.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <metadata
+ id="metadata2216">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs2214" />
+ <sodipodi:namedview
+ inkscape:window-height="778"
+ inkscape:window-width="1278"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="1"
+ guidetolerance="10.0"
+ gridtolerance="10.0"
+ objecttolerance="10.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ inkscape:zoom="4"
+ inkscape:cx="23.5"
+ inkscape:cy="22.689137"
+ inkscape:window-x="0"
+ inkscape:window-y="20"
+ inkscape:current-layer="g3208" />
+ <g
+ id="g3208"
+ transform="translate(-44.517797,4.0967298)">
+ <g
+ id="g3212"
+ transform="matrix(1.0216109,0,0,1.0127041,45.533715,-4.3577662)">
+ <path
+ style="font-size:73.7244339px;font-style:normal;font-weight:normal;fill:#aeaeae;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ d="M 22.62043,20.307707 L 36.04778,0.32867349 L 43.859402,0.32867349 L 26.580238,26.139425 L 22.080456,31.215179 L 6.8531925,54.074074 L -0.9944279,54.074074 L 18.192644,25.383462"
+ id="text2220"
+ sodipodi:nodetypes="cccccccc" />
+ <path
+ id="path3206"
+ d="M 1.4534537,0.32867349 L 9.2650758,0.32867349 L 45.011347,54.074074 L 37.199725,54.074074 L 22.080456,31.215179 L 6.8531925,54.074074 L -0.9944279,54.074074 L 18.192644,25.383462 L 1.4534537,0.32867349"
+ style="font-size:73.7244339px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ sodipodi:nodetypes="ccccccccc" />
+ </g>
+ <path
+ style="font-size:28.207407px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ee0a00;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans Mono"
+ d="M 44.517797,65.480602 L 55.836194,59.828049 L 44.517797,54.228655 L 44.517797,51.056847 L 58.809298,58.321883 L 58.809298,61.298776 L 44.517797,68.652411 M 44.517797,68.652411 L 44.517797,65.480602 M 73.929389,61.298776 L 59.637889,68.652411 L 59.637889,65.480602 L 70.956287,59.828049 L 59.637889,54.228655 L 59.637889,51.056847 L 73.929389,58.321883 L 73.929389,61.298776 z M 91.517797,57.382744 L 77.270452,57.382744 L 77.270452,54.405851 L 91.517797,54.405851 L 91.517797,57.382744 z M 91.517797,65.267967 L 77.270452,65.267967 L 77.270452,62.291073 L 91.517797,62.291073 L 91.517797,65.267967 z "
+ id="text3216"
+ sodipodi:nodetypes="ccccccccccccccccccccccccccc" />
+ </g>
+</svg>
Copied: xmonad/repos/community-x86_64/202e239ea48d56882bb4ad226ad3a4042ebf12bd.patch (from rev 207912, xmonad/trunk/202e239ea48d56882bb4ad226ad3a4042ebf12bd.patch)
===================================================================
--- community-x86_64/202e239ea48d56882bb4ad226ad3a4042ebf12bd.patch (rev 0)
+++ community-x86_64/202e239ea48d56882bb4ad226ad3a4042ebf12bd.patch 2017-01-18 19:47:29 UTC (rev 207913)
@@ -0,0 +1,79 @@
+From 202e239ea48d56882bb4ad226ad3a4042ebf12bd Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones at devalot.com>
+Date: Tue, 22 Nov 2016 18:46:28 -0700
+Subject: [PATCH] Refactor xmonad/xmonad#9 and remove explicit exception
+ handling
+
+---
+ src/XMonad/Operations.hs | 23 +++++++++++++++++++++--
+ xmonad.cabal | 2 +-
+ 2 files changed, 22 insertions(+), 3 deletions(-)
+
+diff --git a/src/XMonad/Operations.hs b/src/XMonad/Operations.hs
+index 153b5a2..cd33974 100644
+--- a/src/XMonad/Operations.hs
++++ b/src/XMonad/Operations.hs
+@@ -34,6 +34,7 @@ import Control.Monad.Reader
+ import Control.Monad.State
+ import qualified Control.Exception.Extensible as C
+
++import System.IO
+ import System.Posix.Process (executeFile)
+ import Graphics.X11.Xlib
+ import Graphics.X11.Xinerama (getScreenInfo)
+@@ -111,7 +112,10 @@ windows f = do
+
+ mapM_ setInitialProperties newwindows
+
+- whenJust (W.peek old) $ \otherw -> io $ setWindowBorder d otherw nbc
++ whenJust (W.peek old) $ \otherw -> do
++ nbs <- asks (normalBorderColor . config)
++ setWindowBorderWithFallback d otherw nbs nbc
++
+ modify (\s -> s { windowset = ws })
+
+ -- notify non visibility
+@@ -151,7 +155,9 @@ windows f = do
+
+ mapM_ (uncurry tileWindow) rects
+
+- whenJust (W.peek ws) $ \w -> io $ setWindowBorder d w fbc
++ whenJust (W.peek ws) $ \w -> do
++ fbs <- asks (focusedBorderColor . config)
++ setWindowBorderWithFallback d w fbs fbc
+
+ mapM_ reveal visible
+ setTopFocus
+@@ -181,6 +187,19 @@ setWMState w v = withDisplay $ \dpy -> do
+ a <- atom_WM_STATE
+ io $ changeProperty32 dpy w a a propModeReplace [fromIntegral v, fromIntegral none]
+
++-- | Set the border color using the window's color map, if possible,
++-- otherwise use fallback.
++setWindowBorderWithFallback :: Display -> Window -> String -> Pixel -> X ()
++setWindowBorderWithFallback dpy w color basic = io $
++ C.handle fallback $ do
++ wa <- getWindowAttributes dpy w
++ pixel <- color_pixel . fst <$> allocNamedColor dpy (wa_colormap wa) color
++ setWindowBorder dpy w pixel
++ where
++ fallback :: C.SomeException -> IO ()
++ fallback e = do hPrint stderr e >> hFlush stderr
++ setWindowBorder dpy w basic
++
+ -- | hide. Hide a window by unmapping it, and setting Iconified.
+ hide :: Window -> X ()
+ hide w = whenX (gets (S.member w . mapped)) $ withDisplay $ \d -> do
+diff --git a/xmonad.cabal b/xmonad.cabal
+index 0de4277..ed77fe7 100644
+--- a/xmonad.cabal
++++ b/xmonad.cabal
+@@ -78,7 +78,7 @@ library
+ process,
+ unix,
+ utf8-string >= 0.3 && < 1.1,
+- X11>=1.5 && < 1.7
++ X11>=1.7 && < 1.8
+
+ if true
+ ghc-options: -funbox-strict-fields -Wall
Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD 2017-01-18 19:47:15 UTC (rev 207912)
+++ community-x86_64/PKGBUILD 2017-01-18 19:47:29 UTC (rev 207913)
@@ -1,61 +0,0 @@
-# $Id$
-# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
-# Maintainer: Vesa Kaihlavirta <vegai at iki.fi>
-# Maintainer: Jelle van der Waa <jelle at archlinux.org>
-# Contributor: shild <shildv at gmail.com>
-
-pkgname=xmonad
-pkgver=0.12
-pkgrel=11
-pkgdesc="Lightweight X11 tiled window manager written in Haskell"
-arch=('i686' 'x86_64')
-url="http://xmonad.org/"
-license=('BSD')
-depends=('ghc=8.0.1' 'gmp' 'haskell-x11=1.7' 'sh' 'haskell-mtl=2.2.1'
- 'haskell-utf8-string' 'haskell-extensible-exceptions=0.1.1.4'
- 'haskell-data-default' 'haskell-setlocale')
-makedepends=('gendesk')
-optdepends=('xorg-xmessage: for displaying visual error messages')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/xmonad/xmonad/archive/v${pkgver}.tar.gz"
- "xmonad.svg" "x11.patch")
-
-md5sums=('c81d688c51fa50aea0e421f4755ee2fc'
- '72bfa5e62e4e44fe7fa59b6a7593d993'
- '0209d1b5c47ad765b2143046874fa247')
-
-prepare() {
- gendesk --pkgname "$pkgname" --pkgdesc "$pkgdesc"
-
- cd $srcdir/$pkgname-$pkgver
- patch -Np1 -i $srcdir/x11.patch
-}
-
-build() {
- cd $srcdir/$pkgname-$pkgver
-
- runhaskell Setup.lhs configure --ghc --enable-shared --enable-split-objs --prefix=/usr \
- --libsubdir=\$compiler/site-local/\$pkgid --docdir=/usr/share/doc/${pkgname}
- runhaskell Setup build
- runhaskell Setup haddock
- runhaskell Setup register --gen-script
- runhaskell Setup unregister --gen-script
- sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
- sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- install -D -m744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
- install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
-
- runhaskell Setup.lhs copy --destdir=$pkgdir
-
- # Requires pandoc, regex-posix, Pretty and cabal
- #runhaskell util/GenerateManpage.hs
-
- install -D -m644 man/xmonad.1 $pkgdir/usr/share/man/man1/xmonad.1
- install -D -m644 LICENSE $pkgdir/usr/share/licenses/xmonad/LICENSE
- install -D -m644 $srcdir/xmonad.svg $pkgdir/usr/share/pixmaps/xmonad.svg
- install -D -m644 $srcdir/xmonad.desktop $pkgdir/usr/share/xsessions/xmonad.desktop
-}
Copied: xmonad/repos/community-x86_64/PKGBUILD (from rev 207912, xmonad/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2017-01-18 19:47:29 UTC (rev 207913)
@@ -0,0 +1,64 @@
+# $Id$
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Maintainer: Vesa Kaihlavirta <vegai at iki.fi>
+# Maintainer: Jelle van der Waa <jelle at archlinux.org>
+# Contributor: shild <shildv at gmail.com>
+
+pkgname=xmonad
+pkgver=0.12
+pkgrel=12
+pkgdesc="Lightweight X11 tiled window manager written in Haskell"
+arch=('i686' 'x86_64')
+url="http://xmonad.org/"
+license=('BSD')
+depends=('ghc=8.0.1' 'gmp' 'haskell-x11=1.7' 'sh' 'haskell-mtl=2.2.1'
+ 'haskell-utf8-string' 'haskell-extensible-exceptions=0.1.1.4'
+ 'haskell-data-default' 'haskell-setlocale')
+makedepends=('gendesk')
+optdepends=('xorg-xmessage: for displaying visual error messages')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/xmonad/xmonad/archive/v${pkgver}.tar.gz"
+ "xmonad.svg" "202e239ea48d56882bb4ad226ad3a4042ebf12bd.patch"
+ "dc078490d0c244af1d0d5370799b83f42dcb7d43.patch")
+
+md5sums=('c81d688c51fa50aea0e421f4755ee2fc'
+ '72bfa5e62e4e44fe7fa59b6a7593d993'
+ '18242b7792e06d63866e06821396220b'
+ '5e7c2833126b8c6658586ca4b647ac6f')
+
+prepare() {
+ gendesk --pkgname "$pkgname" --pkgdesc "$pkgdesc"
+
+ cd $srcdir/$pkgname-$pkgver
+ patch -Np1 -i "$srcdir/202e239ea48d56882bb4ad226ad3a4042ebf12bd.patch"
+ patch -Np1 -i "$srcdir/dc078490d0c244af1d0d5370799b83f42dcb7d43.patch"
+}
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+
+ runhaskell Setup.lhs configure --ghc --enable-shared --enable-split-objs --prefix=/usr \
+ --libsubdir=\$compiler/site-local/\$pkgid --docdir=/usr/share/doc/${pkgname}
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ install -D -m744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
+ install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
+
+ runhaskell Setup.lhs copy --destdir=$pkgdir
+
+ # Requires pandoc, regex-posix, Pretty and cabal
+ #runhaskell util/GenerateManpage.hs
+
+ install -D -m644 man/xmonad.1 $pkgdir/usr/share/man/man1/xmonad.1
+ install -D -m644 LICENSE $pkgdir/usr/share/licenses/xmonad/LICENSE
+ install -D -m644 $srcdir/xmonad.svg $pkgdir/usr/share/pixmaps/xmonad.svg
+ install -D -m644 $srcdir/xmonad.desktop $pkgdir/usr/share/xsessions/xmonad.desktop
+}
Copied: xmonad/repos/community-x86_64/dc078490d0c244af1d0d5370799b83f42dcb7d43.patch (from rev 207912, xmonad/trunk/dc078490d0c244af1d0d5370799b83f42dcb7d43.patch)
===================================================================
--- community-x86_64/dc078490d0c244af1d0d5370799b83f42dcb7d43.patch (rev 0)
+++ community-x86_64/dc078490d0c244af1d0d5370799b83f42dcb7d43.patch 2017-01-18 19:47:29 UTC (rev 207913)
@@ -0,0 +1,179 @@
+From dc078490d0c244af1d0d5370799b83f42dcb7d43 Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones at devalot.com>
+Date: Wed, 23 Nov 2016 16:30:27 -0700
+Subject: [PATCH] Guard most calls to getWindowAttributes since it may throw an
+ exception
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This is a continuation of the work done by Adam Sjøgren (@asjo) to
+resolve an issue where RGBA windows have transparent borders. It also
+fixes bugs related to windows suddenly disappearing right before
+xmonad calls getWindowAttributes.
+
+For more information see xmonad/xmonad#9
+---
+ src/XMonad/Core.hs | 11 +++++++++--
+ src/XMonad/Main.hs | 18 ++++++++++--------
+ src/XMonad/Operations.hs | 37 ++++++++++++++++++++++---------------
+ 3 files changed, 41 insertions(+), 25 deletions(-)
+
+diff --git a/src/XMonad/Core.hs b/src/XMonad/Core.hs
+index a6387fd..3a96954 100644
+--- a/src/XMonad/Core.hs
++++ b/src/XMonad/Core.hs
+@@ -26,7 +26,8 @@ module XMonad.Core (
+ runX, catchX, userCode, userCodeDef, io, catchIO, installSignalHandlers, uninstallSignalHandlers,
+ withDisplay, withWindowSet, isRoot, runOnWorkspaces,
+ getAtom, spawn, spawnPID, xfork, getXMonadDir, recompile, trace, whenJust, whenX,
+- atom_WM_STATE, atom_WM_PROTOCOLS, atom_WM_DELETE_WINDOW, atom_WM_TAKE_FOCUS, ManageHook, Query(..), runQuery
++ atom_WM_STATE, atom_WM_PROTOCOLS, atom_WM_DELETE_WINDOW, atom_WM_TAKE_FOCUS, withWindowAttributes,
++ ManageHook, Query(..), runQuery
+ ) where
+
+ import XMonad.StackSet hiding (modify)
+@@ -49,7 +50,7 @@ import System.Process
+ import System.Directory
+ import System.Exit
+ import Graphics.X11.Xlib
+-import Graphics.X11.Xlib.Extras (Event)
++import Graphics.X11.Xlib.Extras (getWindowAttributes, WindowAttributes, Event)
+ import Data.Typeable
+ import Data.List ((\\))
+ import Data.Maybe (isJust,fromMaybe)
+@@ -207,6 +208,12 @@ withDisplay f = asks display >>= f
+ withWindowSet :: (WindowSet -> X a) -> X a
+ withWindowSet f = gets windowset >>= f
+
++-- | Safely access window attributes.
++withWindowAttributes :: Display -> Window -> (WindowAttributes -> X ()) -> X ()
++withWindowAttributes dpy win f = do
++ wa <- userCode (io $ getWindowAttributes dpy win)
++ catchX (whenJust wa f) (return ())
++
+ -- | True if the given window is the root window
+ isRoot :: Window -> X Bool
+ isRoot w = (w==) <$> asks theRoot
+diff --git a/src/XMonad/Main.hs b/src/XMonad/Main.hs
+index 3da7bb4..57c13c8 100644
+--- a/src/XMonad/Main.hs
++++ b/src/XMonad/Main.hs
+@@ -17,6 +17,7 @@ module XMonad.Main (xmonad) where
+
+ import System.Locale.SetLocale
+ import Control.Arrow (second)
++import qualified Control.Exception.Extensible as E
+ import Data.Bits
+ import Data.List ((\\))
+ import Data.Function
+@@ -290,10 +291,10 @@ handle (KeyEvent {ev_event_type = t, ev_state = m, ev_keycode = code})
+
+ -- manage a new window
+ handle (MapRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do
+- wa <- io $ getWindowAttributes dpy w -- ignore override windows
+- -- need to ignore mapping requests by managed windows not on the current workspace
+- managed <- isClient w
+- when (not (wa_override_redirect wa) && not managed) $ do manage w
++ withWindowAttributes dpy w $ \wa -> do -- ignore override windows
++ -- need to ignore mapping requests by managed windows not on the current workspace
++ managed <- isClient w
++ when (not (wa_override_redirect wa) && not managed) $ manage w
+
+ -- window destroyed, unmanage it
+ -- window gone, unmanage it
+@@ -367,8 +368,6 @@ handle e@(CrossingEvent {ev_event_type = t})
+ -- configure a window
+ handle e@(ConfigureRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do
+ ws <- gets windowset
+- wa <- io $ getWindowAttributes dpy w
+-
+ bw <- asks (borderWidth . config)
+
+ if M.member w (floating ws)
+@@ -382,7 +381,7 @@ handle e@(ConfigureRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do
+ , wc_sibling = ev_above e
+ , wc_stack_mode = ev_detail e }
+ when (member w ws) (float w)
+- else io $ allocaXEvent $ \ev -> do
++ else withWindowAttributes dpy w $ \wa -> io $ allocaXEvent $ \ev -> do
+ setEventType ev configureNotify
+ setConfigureEvent ev w w
+ (wa_x wa) (wa_y wa) (wa_width wa)
+@@ -416,7 +415,7 @@ handle e = broadcastMessage e -- trace (eventName e) -- ignoring
+ scan :: Display -> Window -> IO [Window]
+ scan dpy rootw = do
+ (_, _, ws) <- queryTree dpy rootw
+- filterM ok ws
++ filterM (\w -> ok w `E.catch` skip) ws
+ -- TODO: scan for windows that are either 'IsViewable' or where WM_STATE ==
+ -- Iconic
+ where ok w = do wa <- getWindowAttributes dpy w
+@@ -428,6 +427,9 @@ scan dpy rootw = do
+ return $ not (wa_override_redirect wa)
+ && (wa_map_state wa == waIsViewable || ic)
+
++ skip :: E.SomeException -> IO Bool
++ skip _ = return False
++
+ setNumlockMask :: X ()
+ setNumlockMask = do
+ dpy <- asks display
+diff --git a/src/XMonad/Operations.hs b/src/XMonad/Operations.hs
+index cd33974..390f553 100644
+--- a/src/XMonad/Operations.hs
++++ b/src/XMonad/Operations.hs
+@@ -252,10 +252,10 @@ clearEvents mask = withDisplay $ \d -> io $ do
+ -- | tileWindow. Moves and resizes w such that it fits inside the given
+ -- rectangle, including its border.
+ tileWindow :: Window -> Rectangle -> X ()
+-tileWindow w r = withDisplay $ \d -> do
+- bw <- (fromIntegral . wa_border_width) <$> io (getWindowAttributes d w)
++tileWindow w r = withDisplay $ \d -> withWindowAttributes d w $ \wa -> do
+ -- give all windows at least 1x1 pixels
+- let least x | x <= bw*2 = 1
++ let bw = fromIntegral $ wa_border_width wa
++ least x | x <= bw*2 = 1
+ | otherwise = x - bw*2
+ io $ moveResizeWindow d w (rect_x r) (rect_y r)
+ (least $ rect_width r) (least $ rect_height r)
+@@ -463,20 +463,27 @@ restart prog resume = do
+ -- | Given a window, find the screen it is located on, and compute
+ -- the geometry of that window wrt. that screen.
+ floatLocation :: Window -> X (ScreenId, W.RationalRect)
+-floatLocation w = withDisplay $ \d -> do
+- ws <- gets windowset
+- wa <- io $ getWindowAttributes d w
+- let bw = (fromIntegral . wa_border_width) wa
+- sc <- fromMaybe (W.current ws) <$> pointScreen (fi $ wa_x wa) (fi $ wa_y wa)
+-
+- let sr = screenRect . W.screenDetail $ sc
+- rr = W.RationalRect ((fi (wa_x wa) - fi (rect_x sr)) % fi (rect_width sr))
+- ((fi (wa_y wa) - fi (rect_y sr)) % fi (rect_height sr))
+- (fi (wa_width wa + bw*2) % fi (rect_width sr))
+- (fi (wa_height wa + bw*2) % fi (rect_height sr))
++floatLocation w =
++ catchX go $ do
++ -- Fallback solution if `go' fails. Which it might, since it
++ -- calls `getWindowAttributes'.
++ sc <- W.current <$> gets windowset
++ return (W.screen sc, W.RationalRect 0 0 1 1)
+
+- return (W.screen sc, rr)
+ where fi x = fromIntegral x
++ go = withDisplay $ \d -> do
++ ws <- gets windowset
++ wa <- io $ getWindowAttributes d w
++ let bw = (fromIntegral . wa_border_width) wa
++ sc <- fromMaybe (W.current ws) <$> pointScreen (fi $ wa_x wa) (fi $ wa_y wa)
++
++ let sr = screenRect . W.screenDetail $ sc
++ rr = W.RationalRect ((fi (wa_x wa) - fi (rect_x sr)) % fi (rect_width sr))
++ ((fi (wa_y wa) - fi (rect_y sr)) % fi (rect_height sr))
++ (fi (wa_width wa + bw*2) % fi (rect_width sr))
++ (fi (wa_height wa + bw*2) % fi (rect_height sr))
++
++ return (W.screen sc, rr)
+
+ -- | Given a point, determine the screen (if any) that contains it.
+ pointScreen :: Position -> Position
Deleted: community-x86_64/x11.patch
===================================================================
--- community-x86_64/x11.patch 2017-01-18 19:47:15 UTC (rev 207912)
+++ community-x86_64/x11.patch 2017-01-18 19:47:29 UTC (rev 207913)
@@ -1,12 +0,0 @@
-diff -aur xmonad-0.12/xmonad.cabal xmonad-0.12.new/xmonad.cabal
---- xmonad-0.12/xmonad.cabal 2015-12-18 21:23:38.000000000 +0100
-+++ xmonad-0.12.new/xmonad.cabal 2017-01-08 12:08:19.195824197 +0100
-@@ -71,7 +71,7 @@
- process,
- unix,
- utf8-string >= 0.3 && < 1.1,
-- X11>=1.5 && < 1.7
-+ X11>=1.5 && < 1.8
-
- if true
- ghc-options: -funbox-strict-fields -Wall
Deleted: community-x86_64/xmonad.svg
===================================================================
--- community-x86_64/xmonad.svg 2017-01-18 19:47:15 UTC (rev 207912)
+++ community-x86_64/xmonad.svg 2017-01-18 19:47:29 UTC (rev 207913)
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- id="svg2211"
- sodipodi:version="0.32"
- inkscape:version="0.45.1"
- width="47"
- height="73"
- version="1.0"
- sodipodi:docbase="/home/sjanssen/xmonad-web/images"
- sodipodi:docname="logo.svg"
- inkscape:output_extension="org.inkscape.output.svg.inkscape"
- inkscape:export-filename="/home/sjanssen/xmonad-web/images/logo.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <metadata
- id="metadata2216">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs2214" />
- <sodipodi:namedview
- inkscape:window-height="778"
- inkscape:window-width="1278"
- inkscape:pageshadow="2"
- inkscape:pageopacity="1"
- guidetolerance="10.0"
- gridtolerance="10.0"
- objecttolerance="10.0"
- borderopacity="1.0"
- bordercolor="#666666"
- pagecolor="#ffffff"
- id="base"
- inkscape:zoom="4"
- inkscape:cx="23.5"
- inkscape:cy="22.689137"
- inkscape:window-x="0"
- inkscape:window-y="20"
- inkscape:current-layer="g3208" />
- <g
- id="g3208"
- transform="translate(-44.517797,4.0967298)">
- <g
- id="g3212"
- transform="matrix(1.0216109,0,0,1.0127041,45.533715,-4.3577662)">
- <path
- style="font-size:73.7244339px;font-style:normal;font-weight:normal;fill:#aeaeae;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- d="M 22.62043,20.307707 L 36.04778,0.32867349 L 43.859402,0.32867349 L 26.580238,26.139425 L 22.080456,31.215179 L 6.8531925,54.074074 L -0.9944279,54.074074 L 18.192644,25.383462"
- id="text2220"
- sodipodi:nodetypes="cccccccc" />
- <path
- id="path3206"
- d="M 1.4534537,0.32867349 L 9.2650758,0.32867349 L 45.011347,54.074074 L 37.199725,54.074074 L 22.080456,31.215179 L 6.8531925,54.074074 L -0.9944279,54.074074 L 18.192644,25.383462 L 1.4534537,0.32867349"
- style="font-size:73.7244339px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- sodipodi:nodetypes="ccccccccc" />
- </g>
- <path
- style="font-size:28.207407px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ee0a00;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans Mono"
- d="M 44.517797,65.480602 L 55.836194,59.828049 L 44.517797,54.228655 L 44.517797,51.056847 L 58.809298,58.321883 L 58.809298,61.298776 L 44.517797,68.652411 M 44.517797,68.652411 L 44.517797,65.480602 M 73.929389,61.298776 L 59.637889,68.652411 L 59.637889,65.480602 L 70.956287,59.828049 L 59.637889,54.228655 L 59.637889,51.056847 L 73.929389,58.321883 L 73.929389,61.298776 z M 91.517797,57.382744 L 77.270452,57.382744 L 77.270452,54.405851 L 91.517797,54.405851 L 91.517797,57.382744 z M 91.517797,65.267967 L 77.270452,65.267967 L 77.270452,62.291073 L 91.517797,62.291073 L 91.517797,65.267967 z "
- id="text3216"
- sodipodi:nodetypes="ccccccccccccccccccccccccccc" />
- </g>
-</svg>
Copied: xmonad/repos/community-x86_64/xmonad.svg (from rev 207912, xmonad/trunk/xmonad.svg)
===================================================================
--- community-x86_64/xmonad.svg (rev 0)
+++ community-x86_64/xmonad.svg 2017-01-18 19:47:29 UTC (rev 207913)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg2211"
+ sodipodi:version="0.32"
+ inkscape:version="0.45.1"
+ width="47"
+ height="73"
+ version="1.0"
+ sodipodi:docbase="/home/sjanssen/xmonad-web/images"
+ sodipodi:docname="logo.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ inkscape:export-filename="/home/sjanssen/xmonad-web/images/logo.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <metadata
+ id="metadata2216">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs2214" />
+ <sodipodi:namedview
+ inkscape:window-height="778"
+ inkscape:window-width="1278"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="1"
+ guidetolerance="10.0"
+ gridtolerance="10.0"
+ objecttolerance="10.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ inkscape:zoom="4"
+ inkscape:cx="23.5"
+ inkscape:cy="22.689137"
+ inkscape:window-x="0"
+ inkscape:window-y="20"
+ inkscape:current-layer="g3208" />
+ <g
+ id="g3208"
+ transform="translate(-44.517797,4.0967298)">
+ <g
+ id="g3212"
+ transform="matrix(1.0216109,0,0,1.0127041,45.533715,-4.3577662)">
+ <path
+ style="font-size:73.7244339px;font-style:normal;font-weight:normal;fill:#aeaeae;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ d="M 22.62043,20.307707 L 36.04778,0.32867349 L 43.859402,0.32867349 L 26.580238,26.139425 L 22.080456,31.215179 L 6.8531925,54.074074 L -0.9944279,54.074074 L 18.192644,25.383462"
+ id="text2220"
+ sodipodi:nodetypes="cccccccc" />
+ <path
+ id="path3206"
+ d="M 1.4534537,0.32867349 L 9.2650758,0.32867349 L 45.011347,54.074074 L 37.199725,54.074074 L 22.080456,31.215179 L 6.8531925,54.074074 L -0.9944279,54.074074 L 18.192644,25.383462 L 1.4534537,0.32867349"
+ style="font-size:73.7244339px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ sodipodi:nodetypes="ccccccccc" />
+ </g>
+ <path
+ style="font-size:28.207407px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ee0a00;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans Mono"
+ d="M 44.517797,65.480602 L 55.836194,59.828049 L 44.517797,54.228655 L 44.517797,51.056847 L 58.809298,58.321883 L 58.809298,61.298776 L 44.517797,68.652411 M 44.517797,68.652411 L 44.517797,65.480602 M 73.929389,61.298776 L 59.637889,68.652411 L 59.637889,65.480602 L 70.956287,59.828049 L 59.637889,54.228655 L 59.637889,51.056847 L 73.929389,58.321883 L 73.929389,61.298776 z M 91.517797,57.382744 L 77.270452,57.382744 L 77.270452,54.405851 L 91.517797,54.405851 L 91.517797,57.382744 z M 91.517797,65.267967 L 77.270452,65.267967 L 77.270452,62.291073 L 91.517797,62.291073 L 91.517797,65.267967 z "
+ id="text3216"
+ sodipodi:nodetypes="ccccccccccccccccccccccccccc" />
+ </g>
+</svg>
More information about the arch-commits
mailing list