From bc272ba4aed707522cb458d659940567ac6fc386 Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Wed, 9 Apr 2014 22:44:05 +0200 Subject: use function fluxbox::findScreen() --- src/fluxbox.cc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 995ab91..146ecf6 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -671,20 +671,12 @@ void Fluxbox::handleEvent(XEvent * const e) { if (! winclient) { BScreen *screen = 0; - int screen_num; XWindowAttributes attr; // find screen if (XGetWindowAttributes(display(), e->xmaprequest.window, &attr) && attr.screen != 0) { - screen_num = XScreenNumberOfScreen(attr.screen); - - // find screen - ScreenList::iterator screen_it = find_if(m_screen_list.begin(), - m_screen_list.end(), - FbTk::CompareEqual(&BScreen::screenNumber, screen_num)); - if (screen_it != m_screen_list.end()) - screen = *screen_it; + screen = findScreen(XScreenNumberOfScreen(attr.screen)); } // try with parent if we failed to find screen num if (screen == 0) -- cgit v0.11.2