From 21d821a8dd2c4eb756c31705b92b5b815761608d Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Fri, 6 Jul 2012 13:09:13 +0200 Subject: [PATCH] rotate: Use the draw_widget() function Without this, input handling is broken (draw_widget() registers each widget with its position for input handling). This also removes some unnecessary save()/restore() calls. Our caller (again draw_widget()) already does that for us. Signed-off-by: Uli Schlachter --- lib/wibox/layout/rotate.lua.in | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/wibox/layout/rotate.lua.in b/lib/wibox/layout/rotate.lua.in index f931e35c..7b6a6035 100644 --- a/lib/wibox/layout/rotate.lua.in +++ b/lib/wibox/layout/rotate.lua.in @@ -28,7 +28,6 @@ end function rotate.draw(layout, wibox, cr, width, height) if not layout.widget then return { width = 0, height = 0 } end - cr:save() local dir = layout:get_direction() if dir == "west" then @@ -44,10 +43,7 @@ function rotate.draw(layout, wibox, cr, width, height) -- Since we rotated, we might have to swap width and height. -- transform() does that for us. - layout.widget:draw(wibox, cr, transform(layout, width, height)) - - -- Undo the rotation and translation from above. - cr:restore() + base.draw_widget(wibox, cr, layout.widget, 0, 0, transform(layout, width, height)) end --- Fit this layout into the given area -- 2.11.4.GIT