Enlightenment CVS committal

Author  : jeoparde
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_x


Modified Files:
        Ecore_X.h ecore_x.c 


Log Message:
The almighty nuke function. Use at your own risk! :)


===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- Ecore_X.h   12 Oct 2003 06:55:40 -0000      1.8
+++ Ecore_X.h   12 Oct 2003 07:12:09 -0000      1.9
@@ -492,6 +492,7 @@
 double           ecore_x_double_click_time_get(void);
 void             ecore_x_flush(void);
 void             ecore_x_sync(void);
+void             ecore_x_killall(Ecore_X_Window root);
        
 void             ecore_x_error_handler_set(void (*func) (void *data), const void 
*data);
 void             ecore_x_io_error_handler_set(void (*func) (void *data), const void 
*data);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ecore_x.c   12 Oct 2003 06:55:40 -0000      1.9
+++ ecore_x.c   12 Oct 2003 07:12:09 -0000      1.10
@@ -371,6 +371,41 @@
    XSync(_ecore_x_disp, False);
 }
 
+void
+ecore_x_killall(Ecore_X_Window root)
+{
+   int screens;
+   int i, j;
+   
+   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)
+   {
+      Window root_r;
+      Window parent_r;
+      Window *children_r = NULL;
+      int num_children = 0;
+      Window root = RootWindow(d->display, i);
+
+      while (XQueryTree(_ecore_x_disp, root, &root_r, &parent_r,
+               &children_r, &num_children) && num_children > 0)
+      {
+         for (j = 0; j < num_children; ++j)
+         {
+            XKillClient(_ecore_x_disp, children_r[j]);
+         }
+
+         XFree(children_r);
+      }
+   }
+
+   XUngrabServer(_ecore_x_disp);
+   XSync(_ecore_x_disp, False);
+}
+
 static int
 _ecore_x_fd_handler(void *data, Ecore_Fd_Handler *fd_handler)
 {




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to