use function fluxbox::findScreen()
This commit is contained in:
parent
617635f8eb
commit
bc272ba4ae
1 changed files with 1 additions and 9 deletions
|
@ -671,20 +671,12 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
||||||
|
|
||||||
if (! winclient) {
|
if (! winclient) {
|
||||||
BScreen *screen = 0;
|
BScreen *screen = 0;
|
||||||
int screen_num;
|
|
||||||
XWindowAttributes attr;
|
XWindowAttributes attr;
|
||||||
// find screen
|
// find screen
|
||||||
if (XGetWindowAttributes(display(),
|
if (XGetWindowAttributes(display(),
|
||||||
e->xmaprequest.window,
|
e->xmaprequest.window,
|
||||||
&attr) && attr.screen != 0) {
|
&attr) && attr.screen != 0) {
|
||||||
screen_num = XScreenNumberOfScreen(attr.screen);
|
screen = findScreen(XScreenNumberOfScreen(attr.screen));
|
||||||
|
|
||||||
// find screen
|
|
||||||
ScreenList::iterator screen_it = find_if(m_screen_list.begin(),
|
|
||||||
m_screen_list.end(),
|
|
||||||
FbTk::CompareEqual<BScreen>(&BScreen::screenNumber, screen_num));
|
|
||||||
if (screen_it != m_screen_list.end())
|
|
||||||
screen = *screen_it;
|
|
||||||
}
|
}
|
||||||
// try with parent if we failed to find screen num
|
// try with parent if we failed to find screen num
|
||||||
if (screen == 0)
|
if (screen == 0)
|
||||||
|
|
Loading…
Reference in a new issue