Systray: Correctly compute extents (FS#768)

The systray bases its extents on the size of the wibox that it is contained in.
No idea how this is supposed to work when the systray doesn't get the full size,
but in a vertical wibox, using <height of wibox> * <number of icons in systray>
certainly doesn't work for computing the size.

The fix isn't hard: Check the wibox' orientation when drawing and base our
calculation on its width if its orientation is different from East.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-08-31 18:48:09 +02:00
parent e5d4ff6147
commit 92183caad0
1 changed files with 5 additions and 1 deletions

View File

@ -79,7 +79,11 @@ systray_draw(widget_t *widget, draw_context_t *ctx,
}
systray_data_t *d = widget->data;
d->height = p->geometry.height;
if (p->orientation == East)
d->height = p->geometry.height;
else
d->height = p->geometry.width;
/* set wibox orientation */
/** \todo stop setting that property on each redraw */