wibox: fix a (harmless) X protocol error message

When creating a wibox the call to simplewindow_orientation_set() caused a
pixmap to be allocated, but the width and height weren't initialized yet.
Thus, awesome tried to create a 0x0 pixmap which the X server doesn't like.

This fixes the error and I haven't noticed any bad effects due to this patch.
Plus this should avoid some unneeded pixmap allocations. ;)

W: awesome: xerror:289: X error: request=CreatePixmap, error=BadValue

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Uli Schlachter 2009-03-17 19:50:21 +01:00 committed by Julien Danjou
parent 6395db4331
commit 7f7aac4583
1 changed files with 3 additions and 3 deletions

View File

@ -712,13 +712,13 @@ luaA_wibox_new(lua_State *L)
case Bottom: case Bottom:
case Top: case Top:
case Floating: case Floating:
simplewindow_orientation_set(&w->sw, East); w->sw.orientation = East;
break; break;
case Left: case Left:
simplewindow_orientation_set(&w->sw, North); w->sw.orientation = North;
break; break;
case Right: case Right:
simplewindow_orientation_set(&w->sw, South); w->sw.orientation = South;
break; break;
} }