1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 12:58:08 +01:00

code clean at startup.c

Small code clean at startup.c
This commit is contained in:
Rodolfo García Peñas (kix)
2013-04-03 20:01:46 +02:00
committed by Carlos R. Mafra
parent 052efedd93
commit b9e8bbbdc7

View File

@@ -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;
} }