mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 21:08:08 +01:00
code clean at startup.c
Small code clean at startup.c
This commit is contained in:
committed by
Carlos R. Mafra
parent
052efedd93
commit
b9e8bbbdc7
@@ -415,16 +415,12 @@ WScreen *wScreenForRootWindow(Window window)
|
|||||||
if (wScreenCount == 1)
|
if (wScreenCount == 1)
|
||||||
return wScreen[0];
|
return wScreen[0];
|
||||||
|
|
||||||
/*
|
/* Since the number of heads will probably be small (normally 2),
|
||||||
* Since the number of heads will probably be small (normally 2),
|
|
||||||
* it should be faster to use this than a hash table, because
|
* it should be faster to use this than a hash table, because
|
||||||
* of the overhead.
|
* of the overhead. */
|
||||||
*/
|
for (i = 0; i < wScreenCount; i++)
|
||||||
for (i = 0; i < wScreenCount; i++) {
|
if (wScreen[i]->root_win == window)
|
||||||
if (wScreen[i]->root_win == window) {
|
|
||||||
return wScreen[i];
|
return wScreen[i];
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return wScreenForWindow(window);
|
return wScreenForWindow(window);
|
||||||
}
|
}
|
||||||
@@ -436,9 +432,9 @@ WScreen *wScreenForWindow(Window window)
|
|||||||
if (wScreenCount == 1)
|
if (wScreenCount == 1)
|
||||||
return wScreen[0];
|
return wScreen[0];
|
||||||
|
|
||||||
if (XGetWindowAttributes(dpy, window, &attr)) {
|
if (XGetWindowAttributes(dpy, window, &attr))
|
||||||
return wScreenForRootWindow(attr.root);
|
return wScreenForRootWindow(attr.root);
|
||||||
}
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user