wibox.drawable: Handle gears.surface's new error handling

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2016-01-17 17:38:52 +01:00
parent 0a21931ffc
commit de6d9334d8
1 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ local function get_widget_context(self)
end
local function do_redraw(self)
local surf = surface(self.drawable.surface)
local surf = surface.load_silently(self.drawable.surface, false)
-- The surface can be nil if the drawable's parent was already finalized
if not surf then return end
local cr = cairo.Context(surf)
@ -113,7 +113,7 @@ local function do_redraw(self)
if not capi.awesome.composite_manager_running then
-- This is pseudo-transparency: We draw the wallpaper in the background
if not wallpaper then
wallpaper = surface(capi.root.wallpaper())
wallpaper = surface.load_silently(capi.root.wallpaper(), false)
end
if wallpaper then
cr.operator = cairo.Operator.SOURCE