[xmonad] darcs patch: Fix possible head []
Sean Escriva
sean.escriva at gmail.com
Tue Jan 6 14:44:35 EST 2009
On Tue, Jan 06, 2009 at 08:21:15PM +0100, Joachim Breitner wrote:
> Hi,
>
> there are not many places where head is used in xmonad, but this is one of
> them. Time to make it safe.
Interesting. I had noticed an occasional 'Prelude: head empty
list' message. I wonder if this is the source.
>
> Greetings,
> Joachim
>
>
> Tue Jan 6 20:20:26 CET 2009 Joachim Breitner <mail at joachim-breitner.de>
> * Fix possible head []
> This seems to be a rare case, but I just got hit by it.
>
Content-Description: A darcs patch for your repository!
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> New patches:
>
> [Fix possible head []
> Joachim Breitner <mail at joachim-breitner.de>**20090106192026
> This seems to be a rare case, but I just got hit by it.
> ] hunk ./XMonad/ManageHook.hs 74
> getProp =
> (internAtom d "_NET_WM_NAME" False >>= getTextProperty d w)
> `catch` \_ -> getTextProperty d w wM_NAME
> - - extract = fmap head . wcTextPropertyToTextList d
> + extract prop = do l <- wcTextPropertyToTextList d prop
> + return $ if null l then "" else head l
> io $ bracket getProp (xFree . tp_value) extract `catch` \_ -> return ""
>
> -- | Return the application name.
>
> Context:
>
> [Call logHook as the very last action in windows
> Spencer Janssen <spencerjanssen at gmail.com>**20081209233700
> Ignore-this: 4396ad891b607780f8e4b3b6bbce87e
> ]
> [Accept inferior crossing events. This patch enables fmouse-focus-follows-screen
> Spencer Janssen <spencerjanssen at gmail.com>**20081205045130
> Ignore-this: 3ac329fb92839827aed0a4370784cabd
> ]
> [Tile all windows at once
> Spencer Janssen <spencerjanssen at gmail.com>**20081118074447]
> [Factor rational rect scaling into a separate function
> Spencer Janssen <spencerjanssen at gmail.com>**20081118072849]
> [Change screen focus by clicking on the root window.
> Spencer Janssen <spencerjanssen at gmail.com>**20081106224031
> This is a modification of a patch from Joachim Breitner.
> ]
> [Fix #192.
> Spencer Janssen <spencerjanssen at gmail.com>**20081021220059]
> [select base < 4 for building on ghc 6.10
> Adam Vogt <vogt.adam at gmail.com>**20081013214509]
> [add killWindow function
> Joachim Breitner <mail at joachim-breitner.de>**20081005001804
> This is required to kill anything that is not focused, without
> having to focus it first.
> ]
> [add'l documentation
> Devin Mullins <me at twifkak.com>**20080927234639]
> [Regression: ungrab buttons on *non* root windows
> Spencer Janssen <spencerjanssen at gmail.com>**20081007214351]
> [Partial fix for #40
> Spencer Janssen <spencerjanssen at gmail.com>**20081007212053
> Improvements:
> - clicking on the root will change focus to that screen
> - moving the mouse from a window on a screen to an empty screen changes focus
> to that screen
> The only remaining issue is that moving the mouse between two empty screens
> does not change focus. In order to solve this, we'd have to select motion events
> on the root window, which is potentially expensive.
> ]
> [Track mouse position via events received
> Spencer Janssen <spencerjanssen at gmail.com>**20081007203953]
> [Fix haddock
> Spencer Janssen <spencerjanssen at gmail.com>**20081007094641]
> [Move screen locating code into pointScreen
> Spencer Janssen <spencerjanssen at gmail.com>**20081007094207]
> [Make pointWithin a top-level binding
> Spencer Janssen <spencerjanssen at gmail.com>**20081007090229]
> [sp README, CONFIG, STYLE, TODO
> gwern0 at gmail.com**20080913024457]
> [Use the same X11 dependency as xmonad-contrib
> Spencer Janssen <spencerjanssen at gmail.com>**20080921061508]
> [Export focusUp' and focusDown' -- work entirely on stacks
> Spencer Janssen <spencerjanssen at gmail.com>**20080911214803]
> [add W.shiftMaster, fix float/tile-reordering bug
> Devin Mullins <me at twifkak.com>**20080911053909]
> [TAG 0.8
> Spencer Janssen <spencerjanssen at gmail.com>**20080905195412]
> [Spelling. Any bets on how long this has been there?
> Spencer Janssen <spencerjanssen at gmail.com>**20080905195211]
> [Bump version to 0.8
> Spencer Janssen <spencerjanssen at gmail.com>**20080905194225]
> [Remove obsolete comments about darcs X11
> Spencer Janssen <spencerjanssen at gmail.com>**20080905194915]
> [Recommend latest packages rather than specific versions
> Spencer Janssen <spencerjanssen at gmail.com>**20080905194837]
> [Also remove -optl from the executable section
> Spencer Janssen <spencerjanssen at gmail.com>**20080820210023]
> [-optl-Wl,-s is not needed with recent Cabal versions
> Spencer Janssen <spencerjanssen at gmail.com>**20080820204102]
> [Haddock links
> Malebria <malebria at riseup.net>**20080601212515]
> [Haddock syntax for enumeration
> Malebria <malebria at riseup.net>**20080601204951]
> [I prefer the spencerjanssen at gmail.com address now
> Spencer Janssen <spencerjanssen at gmail.com>**20080714202650]
> [Raise windows in the floating layer when moving or resizing
> Trevor Elliott <trevor at galois.com>**20080521215057]
> [add currentTag convenience function
> Devin Mullins <me at twifkak.com>**20080511224258]
> [Make Mirror a newtype
> Spencer Janssen <sjanssen at cse.unl.edu>**20080508104640]
> [Comments
> Spencer Janssen <sjanssen at cse.unl.edu>**20080507013122]
> [Break long line
> Spencer Janssen <sjanssen at cse.unl.edu>**20080507012608]
> [Style
> Spencer Janssen <sjanssen at cse.unl.edu>**20080507012519]
> [Simplify
> Spencer Janssen <sjanssen at cse.unl.edu>**20080507011309]
> [Overhaul Choose, fixes issue 183
> Spencer Janssen <sjanssen at cse.unl.edu>**20080506220809]
> [Remember if focus changes were caused by mouse actions or by key commands
> Klaus Weidner <kweidner at pobox.com>**20080502175603
>
> If the user used the mouse to change window focus (moving into or clicking on a
> window), this should be handled differently than focus changes due to keyboard
> commands. Specifically, it's inappropriate to discard window enter/leave events
> while the mouse is moving. This fixes the bug where a fast mouse motion across
> multiple windows resulted in the wrong window keeping focus.
>
> It's also helpful information for contrib modules such as UpdatePointer - it's
> supposed to move the mouse pointer only in response to keyboard actions, not if
> the user was moving the mouse.
> ]
> [Wibble
> Spencer Janssen <sjanssen at cse.unl.edu>**20080506203840]
> [Added doShift function for more user-friendly hooks
> Ivan N. Veselov <veselov at gmail.com>**20080506185757]
> [use named colours. fixes startup failure on the XO
> Don Stewart <dons at galois.com>**20080502210149]
> [Set focus *after* revealing windows
> Spencer Janssen <sjanssen at cse.unl.edu>**20080407222559]
> [Reveal windows after moving/resizing them.
> Spencer Janssen <sjanssen at cse.unl.edu>**20080407220756
> This should reduce the number of repaints for newly visible windows.
> ]
> [Hide newly created but non-visible windows (fixes bug #172)
> Spencer Janssen <sjanssen at cse.unl.edu>**20080430014012]
> [formatting, eta expansion
> Don Stewart <dons at galois.com>**20080418184337]
> [XMonad.ManageHook: add 'appName', another name for 'resource'
> Lukas Mai <l.mai at web.de>**20080406012006]
> [XMonad.ManageHook: make 'title' locale-aware; haddock cleanup
> Lukas Mai <l.mai at web.de>**20080406011338
>
> The code for 'title' was stolen from getname.patch (bug #44).
> ]
> [XMonad.Main: call setlocale on startup
> Lukas Mai <l.mai at web.de>**20080406011234]
> [floats always use current screen (with less bugs)
> robreim at bobturf.org**20080405135009]
> [XMonad.Operations: applySizeHint reshuffle
> Lukas Mai <l.mai at web.de>**20080404215615
>
> Make applySizeHints take window borders into account. Move old functionality
> to applySizeHintsContents. Add new mkAdjust function that generates a custom
> autohinter for a window.
> ]
> [XMonad.Layout: documentation cleanup
> Lukas Mai <l.mai at web.de>**20080404215444]
> [Remove gaps from the example config
> Spencer Janssen <sjanssen at cse.unl.edu>**20080329232959]
> [Remove gaps
> Spencer Janssen <sjanssen at cse.unl.edu>**20080325091526]
> [TAG 0.7
> Spencer Janssen <sjanssen at cse.unl.edu>**20080329210249]
> Patch bundle hash:
> c96654727f15a077585f6c4a7839e29a9a2797f9
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkljrw4ACgkQ9ijrk0dDIGx70wCfbSk+f1awQU6RrTHPvUhgP5W+
> jW8AoLcYFpIJeN5YcL3TqMMcRlYbXyPm
> =h7FS
> -----END PGP SIGNATURE-----
> _______________________________________________
> xmonad mailing list
> xmonad at haskell.org
> http://www.haskell.org/mailman/listinfo/xmonad
More information about the xmonad
mailing list