diff options
-rw-r--r-- | src/fluxbox.cc | 10 |
1 files changed, 1 insertions, 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) { | |||
671 | 671 | ||
672 | if (! winclient) { | 672 | if (! winclient) { |
673 | BScreen *screen = 0; | 673 | BScreen *screen = 0; |
674 | int screen_num; | ||
675 | XWindowAttributes attr; | 674 | XWindowAttributes attr; |
676 | // find screen | 675 | // find screen |
677 | if (XGetWindowAttributes(display(), | 676 | if (XGetWindowAttributes(display(), |
678 | e->xmaprequest.window, | 677 | e->xmaprequest.window, |
679 | &attr) && attr.screen != 0) { | 678 | &attr) && attr.screen != 0) { |
680 | screen_num = XScreenNumberOfScreen(attr.screen); | 679 | screen = findScreen(XScreenNumberOfScreen(attr.screen)); |
681 | |||
682 | // find screen | ||
683 | ScreenList::iterator screen_it = find_if(m_screen_list.begin(), | ||
684 | m_screen_list.end(), | ||
685 | FbTk::CompareEqual<BScreen>(&BScreen::screenNumber, screen_num)); | ||
686 | if (screen_it != m_screen_list.end()) | ||
687 | screen = *screen_it; | ||
688 | } | 680 | } |
689 | // try with parent if we failed to find screen num | 681 | // try with parent if we failed to find screen num |
690 | if (screen == 0) | 682 | if (screen == 0) |