diff options
| author | Andrea Rossato <andrea.rossato@ing.unitn.it> | 2007-07-24 19:30:47 +0200 | 
|---|---|---|
| committer | Andrea Rossato <andrea.rossato@ing.unitn.it> | 2007-07-24 19:30:47 +0200 | 
| commit | 68104c657b29d605fd6ac05962badceb1bec801e (patch) | |
| tree | e7e65c303d72bec76925408bc481e739be6cc8ab | |
| parent | 96e1563c37087d506a4842c1a5f96488ee7aa049 (diff) | |
| download | xmobar-68104c657b29d605fd6ac05962badceb1bec801e.tar.gz xmobar-68104c657b29d605fd6ac05962badceb1bec801e.tar.bz2 | |
loadQueryFont must be protected by catch
Expecially now that fonts can be easily choose with a command line options.
darcs-hash:20070724173047-d6583-30c6a0a1315216cb21e3132c64448e01bd846de2.gz
| -rw-r--r-- | Xmobar.hs | 3 | 
1 files changed, 2 insertions, 1 deletions
| @@ -140,7 +140,8 @@ drawInWin str =         bgcolor  <-  io $ initColor dpy $ bgColor config         gc <- io $ createGC dpy win         --let's get the fonts -       fontst <-  io $ loadQueryFont dpy (font config) +       let lf c = loadQueryFont dpy (font c) +       fontst <-  io $ catch (lf config) (const $ lf defaultConfig)         io $ setFont dpy gc (fontFromFontStruct fontst)         -- create a pixmap to write to and fill it with a rectangle         p <- io $ createPixmap dpy win  | 
