From 94824d23146a8d318fae836793ae0d9b125c45fa Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sun, 16 Sep 2007 00:17:05 +0200 Subject: [PATCH] remove another DefaultRootWindow --- event.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/event.c b/event.c index 386a95f4..4ad0bf16 100644 --- a/event.c +++ b/event.c @@ -194,13 +194,15 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf) resizemouse(c, awesomeconf); } } - else if(DefaultRootWindow(e->xany.display) == ev->window && !sel) - { - if(ev->button == Button4) - uicb_tag_viewnext(e->xany.display, &dc, awesomeconf, NULL); - else if(ev->button == Button5) - uicb_tag_viewprev(e->xany.display, &dc, awesomeconf, NULL); - } + else if(!sel) + for(i = 0; i < ScreenCount(e->xany.display); i++) + if(RootWindow(e->xany.display, i) == ev->window) + { + if(ev->button == Button4) + uicb_tag_viewnext(e->xany.display, &dc, awesomeconf, NULL); + else if(ev->button == Button5) + uicb_tag_viewprev(e->xany.display, &dc, awesomeconf, NULL); + } } void