From 92183caad07d59987993e24f5335d5ceb5b4f7f5 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Tue, 31 Aug 2010 18:48:09 +0200 Subject: [PATCH] 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 * 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 --- widgets/systray.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/widgets/systray.c b/widgets/systray.c index 68e9a83d..ab745069 100644 --- a/widgets/systray.c +++ b/widgets/systray.c @@ -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 */