mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
Decoration: don't crash when given a non-existent font
This commit is contained in:
parent
17342a2421
commit
300a017edf
@ -66,7 +66,8 @@ withGC w fn f = withDisplay $ \d -> do gc <- io $ createGC d w
|
|||||||
let fontname = if fn == ""
|
let fontname = if fn == ""
|
||||||
then "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
|
then "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
|
||||||
else fn
|
else fn
|
||||||
font <- io $ loadQueryFont d fontname
|
font <- io $ catch (loadQueryFont d fontname)
|
||||||
|
(const $ loadQueryFont d "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*")
|
||||||
io $ setFont d gc (fontFromFontStruct font)
|
io $ setFont d gc (fontFromFontStruct font)
|
||||||
f d w gc font
|
f d w gc font
|
||||||
io $ freeGC d gc
|
io $ freeGC d gc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user