From f05a695dbab36672701a642ba8afef8d0dd80033 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 12 Nov 2007 09:58:04 +0100 Subject: [PATCH] Simplify a bit this code --- event.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/event.c b/event.c index 17713698d..ef1ffbbb4 100644 --- a/event.c +++ b/event.c @@ -458,13 +458,9 @@ handle_event_maprequest(XEvent * e, awesome_config *awesomeconf) if(!get_client_bywin(*awesomeconf->clients, ev->window)) { for(screen = 0; wa.screen != ScreenOfDisplay(e->xany.display, screen); screen++); - if(screen == 0) - { - if(XQueryPointer(e->xany.display, RootWindow(e->xany.display, screen), - &dummy, &dummy, &x, &y, &d, &d, &m)) - screen = get_screen_bycoord(e->xany.display, x, y); - - } + if(screen == 0 && XQueryPointer(e->xany.display, RootWindow(e->xany.display, screen), + &dummy, &dummy, &x, &y, &d, &d, &m)) + screen = get_screen_bycoord(e->xany.display, x, y); client_manage(ev->window, &wa, &awesomeconf[screen]); } }