From cf96cf971528c293f4f12e7b0ba1ed259e731cb6 Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Thu, 26 Mar 2009 20:36:10 +0100 Subject: [PATCH] Event mouse: Fix screen condition for bar mouse binding --- src/config_struct.h | 2 +- src/event.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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)