[awesome-menu] Check that we have enough width to draw our items

This commit is contained in:
Julien Danjou 2008-03-09 16:43:02 +01:00
parent 4a41a50a39
commit 33560c393d
1 changed files with 1 additions and 1 deletions

View File

@ -383,7 +383,7 @@ redraw(void)
geometry.width -= len; geometry.width -= len;
prompt_len = geometry.x; prompt_len = geometry.x;
for(item = globalconf.items; item; item = item->next) for(item = globalconf.items; item && geometry.width > 0; item = item->next)
if(item->match) if(item->match)
{ {
len = MARGIN + draw_textwidth(globalconf.display, globalconf.font, item->data); len = MARGIN + draw_textwidth(globalconf.display, globalconf.font, item->data);