diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2014-04-09 20:44:05 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2014-04-09 20:44:05 (GMT) |
commit | bc272ba4aed707522cb458d659940567ac6fc386 (patch) | |
tree | 23847dcd717a724f72a4a44731323ba6f0e6bd32 /src | |
parent | 617635f8eb87bd21ef9e57a578398fbba14173f2 (diff) | |
download | fluxbox-bc272ba4aed707522cb458d659940567ac6fc386.zip fluxbox-bc272ba4aed707522cb458d659940567ac6fc386.tar.bz2 |
use function fluxbox::findScreen()
Diffstat (limited to 'src')
-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) |