From a7902f626049662e889230615b55fce0d295aa2d Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Tue, 1 Apr 2014 16:20:45 +0200 Subject: [PATCH] wibox.drawable: Assert that no cairo error occurred Signed-off-by: Uli Schlachter --- lib/wibox/drawable.lua.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/wibox/drawable.lua.in b/lib/wibox/drawable.lua.in index 666a69ec7..8282e6d0c 100644 --- a/lib/wibox/drawable.lua.in +++ b/lib/wibox/drawable.lua.in @@ -12,6 +12,7 @@ local capi = { local beautiful = require("beautiful") local cairo = require("lgi").cairo local color = require("gears.color") +local debug = require("gears.debug") local object = require("gears.object") local sort = require("gears.sort") local surface = require("gears.surface") @@ -59,6 +60,8 @@ local function do_redraw(self) end self.drawable:refresh() + + debug.assert(cr.status == "SUCCESS", "Cairo context entered error state: " .. cr.status) end --- Register a widget's position.