Event mouse: Fix screen condition for bar mouse binding

This commit is contained in:
Martin Duquesnoy 2009-03-26 20:36:10 +01:00
parent 4d5883bbf0
commit cf96cf9715
2 changed files with 3 additions and 2 deletions

View File

@ -48,7 +48,7 @@ cfg_opt_t misc_opts[] =
cfg_opt_t mouse_button_opts[] =
{
CFG_INT("tag", -1, CFGF_NONE),
CFG_INT("screen", 0, CFGF_NONE),
CFG_INT("screen", -1, CFGF_NONE),
CFG_STR("button", "Button1", CFGF_NONE),
CFG_STR("func", "", CFGF_NONE),
CFG_STR("cmd", "", CFGF_NONE),

View File

@ -82,7 +82,8 @@ buttonpress(XButtonEvent *ev)
for(i = 0; i < screen_count(); ++i)
if(ev->window == infobar[i].bar->win)
for(j = 0; j < conf.bars.nmouse; ++j)
if(conf.bars.mouse[j].screen == i)
if(conf.bars.mouse[j].screen == i
|| conf.bars.mouse[j].screen < 0)
if(conf.bars.mouse[j].tag == seltag[i]
|| conf.bars.mouse[j].tag < 0)
if(ev->button == conf.bars.mouse[j].button)