dont loop over screens - pointless

SVN revision: 27042
This commit is contained in:
Carsten Haitzler 2006-11-11 04:27:07 +00:00
parent 6bc4fbac26
commit 37f6b78efe
1 changed files with 11 additions and 19 deletions

View File

@ -603,33 +603,25 @@ ecore_x_sync(void)
EAPI void
ecore_x_killall(Ecore_X_Window root)
{
unsigned int screens;
unsigned int i, j;
Window root_r;
Window parent_r;
Window *children_r = NULL;
unsigned int num_children = 0;
XGrabServer(_ecore_x_disp);
screens = ScreenCount(_ecore_x_disp);
/* Tranverse window tree starting from root, and drag each
* before the firing squad */
for (i = 0; i < screens; ++i)
while (XQueryTree(_ecore_x_disp, root, &root_r, &parent_r,
&children_r, &num_children) && (num_children > 0))
{
Window root_r;
Window parent_r;
Window *children_r = NULL;
unsigned int num_children = 0;
while (XQueryTree(_ecore_x_disp, root, &root_r, &parent_r,
&children_r, &num_children) && (num_children > 0))
for (j = 0; j < num_children; ++j)
{
for (j = 0; j < num_children; ++j)
{
XKillClient(_ecore_x_disp, children_r[j]);
}
XFree(children_r);
XKillClient(_ecore_x_disp, children_r[j]);
}
XFree(children_r);
}
XUngrabServer(_ecore_x_disp);
XSync(_ecore_x_disp, False);
}