diff --git a/src/config_struct.h b/src/config_struct.h index 1031e32..08eddfd 100644 --- a/src/config_struct.h +++ b/src/config_struct.h @@ -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), diff --git a/src/event.c b/src/event.c index 224b260..8822ec8 100644 --- a/src/event.c +++ b/src/event.c @@ -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)