mouse button press on the statusbar causes segfault
The tags member of screen is no longer an array but a linked list, thus tags[0] (used in config.c) is ok since tags points to the first tag struct, but tags[i], i>0 is wrong. There is one such use in handle_event_buttonpress, causing awesome to segfault when pressing with the mouse on the statusbar. The attached patch fixes this.
This commit is contained in:
parent
2990514863
commit
395c0ba6d7
2
event.c
2
event.c
|
@ -75,7 +75,7 @@ handle_event_buttonpress(XEvent * e)
|
|||
{
|
||||
for(i = 1, tag = globalconf.screens[screen].tags; tag; tag = tag->next, i++)
|
||||
{
|
||||
x += textwidth_primitive(e->xany.display, globalconf.screens[screen].font, globalconf.screens[screen].tags[i].name);
|
||||
x += textwidth_primitive(e->xany.display, globalconf.screens[screen].font, tag->name);
|
||||
if(((globalconf.screens[screen].statusbar.position == BarTop
|
||||
|| globalconf.screens[screen].statusbar.position == BarBot)
|
||||
&& ev->x < x)
|
||||
|
|
Loading…
Reference in New Issue