Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_hints.c 


Log Message:


errr we really should do this for ALL root windows as some apps explicitly
run on :0.1 will never find the hints on :0.0's root unless they go look :)

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_hints.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_hints.c   2 Jan 2005 17:23:49 -0000       1.3
+++ e_hints.c   3 Jan 2005 03:14:45 -0000       1.4
@@ -3,25 +3,23 @@
  */
 #include "e.h"
 
-static Ecore_X_Window root;
-
 void
 e_hints_init(void)
 {
-   Ecore_X_Window win;
    Ecore_X_Window *roots = NULL;
    int num;
 
    roots = ecore_x_window_root_list(&num);
-
-   win = ecore_x_window_new(0, -200, -200, 5, 5);
-
    if (roots)
      {
-        if (num > 0)
+       int i;
+       
+       for (i = 0; i < num; i++)
          {
-            root = roots[0];
-            ecore_x_netwm_wm_identify(root, win, "Enlightenment");
+            Ecore_X_Window win;
+            
+            win = ecore_x_window_new(roots[i], -200, -200, 5, 5);
+            ecore_x_netwm_wm_identify(roots[i], win, "Enlightenment");
          }
         free(roots);
      }
@@ -30,7 +28,7 @@
 void
 e_hints_client_list_set(void)
 {
-   Evas_List *mlist = NULL, *clist = NULL, *blist = NULL;
+   Evas_List *ml = NULL, *cl = NULL, *bl = NULL;
    unsigned int i = 0, num = 0;
    E_Manager *m;
    E_Container *c;
@@ -38,12 +36,12 @@
    Ecore_X_Window *clients = NULL;
 
    /* Get client count by adding client lists on all containers */
-   for (mlist = e_manager_list(); mlist; mlist = mlist->next)
+   for (ml = e_manager_list(); ml; ml = ml->next)
      {
-       m = mlist->data;
-       for (clist = m->containers; clist; clist = clist->next)
+       m = ml->data;
+       for (cl = m->containers; cl; cl = cl->next)
          {
-            c = clist->data;
+            c = cl->data;
             num += evas_list_count(c->clients);
          }
      }
@@ -55,27 +53,34 @@
    /* Fetch window IDs and add to array */
    if (num > 0)
      {
-       for (mlist = e_manager_list(); mlist; mlist = mlist->next)
+       for (ml = e_manager_list(); ml; ml = ml->next)
          {
-            m = mlist->data;
-            for (clist = m->containers; clist; clist = clist->next)
+            m = ml->data;
+            for (cl = m->containers; cl; cl = cl->next)
               {
-                 c = clist->data;
-                 for (blist = c->clients; blist; blist = blist->next)
+                 c = cl->data;
+                 for (bl = c->clients; bl; bl = bl->next)
                    {
-                      b = blist->data;
+                      b = bl->data;
                       clients[i++] = b->win;
                    }
               }
          }
-       
-       ecore_x_netwm_client_list_set(root, num, clients);
-       ecore_x_netwm_client_list_stacking_set(root, num, clients);
+       for (ml = e_manager_list(); ml; ml = ml->next)
+         {
+            m = ml->data;
+            ecore_x_netwm_client_list_set(m->root, num, clients);
+            ecore_x_netwm_client_list_stacking_set(m->root, num, clients);
+         }
      }
    else
      {
-       ecore_x_netwm_client_list_set(root, 0, NULL);
-       ecore_x_netwm_client_list_stacking_set(root, 0, NULL);
+       for (ml = e_manager_list(); ml; ml = ml->next)
+         {
+            m = ml->data;
+            ecore_x_netwm_client_list_set(m->root, 0, NULL);
+            ecore_x_netwm_client_list_stacking_set(m->root, 0, NULL);
+         }
      }
 
 }
@@ -85,7 +90,7 @@
 void
 e_hints_client_stacking_set(void)
 {
-   Evas_List *mlist = NULL, *clist = NULL, *blist = NULL;
+   Evas_List *ml = NULL, *cl = NULL, *bl = NULL;
    unsigned int i = 0, num = 0;
    E_Manager *m;
    E_Container *c;
@@ -93,12 +98,12 @@
    Ecore_X_Window *clients = NULL;
 
    /* Get client count */
-   for (mlist = e_manager_list(); mlist; mlist = mlist->next)
+   for (ml = e_manager_list(); ml; ml = ml->next)
      {
-       m = mlist->data;
-       for (clist = m->containers; clist; clist = clist->next)
+       m = ml->data;
+       for (cl = m->containers; cl; cl = cl->next)
          {
-            c = clist->data;
+            c = cl->data;
             num += evas_list_count(c->clients);
          }
      }
@@ -109,25 +114,32 @@
 
    if (num > 0)
      {
-       for (mlist = e_manager_list(); mlist; mlist = mlist->next)
+       for (ml = e_manager_list(); ml; ml = ml->next)
          {
-            m = mlist->data;
-            for (clist = m->containers; clist; clist = clist->next)
+            m = ml->data;
+            for (cl = m->containers; cl; cl = cl->next)
               {
-                 c = clist->data;
-                 for (blist = c->clients; blist; blist = blist->next)
+                 c = cl->data;
+                 for (bl = c->clients; bl; bl = bl->next)
                    {
-                      b = blist->data;
+                      b = bl->data;
                       clients[i++] = b->win;
                    }
               }
          }
-       
-       ecore_x_netwm_client_list_stacking_set(root, num, clients);
+       for (ml = e_manager_list(); ml; ml = ml->next)
+         {
+            m = ml->data;
+            ecore_x_netwm_client_list_stacking_set(m->root, num, clients);
+         }
      }
    else
      {
-       ecore_x_netwm_client_list_stacking_set(root, 0, NULL);
+       for (ml = e_manager_list(); ml; ml = ml->next)
+         {
+            m = ml->data;
+            ecore_x_netwm_client_list_stacking_set(m->root, 0, NULL);
+         }
      }
 
 }
@@ -135,7 +147,15 @@
 void
 e_hints_active_window_set(Ecore_X_Window win)
 {
-   ecore_x_netwm_client_active_set(root, win);
+   Evas_List *ml;
+   
+   for (ml = e_manager_list(); ml; ml = ml->next)
+     {
+       E_Manager *m;
+       
+       m = ml->data;
+       ecore_x_netwm_client_active_set(m->root, win);
+     }
 }
 
 void
@@ -191,9 +211,13 @@
          }
      }
    
-   ecore_x_netwm_desk_count_set(root, num);
-   ecore_x_netwm_desk_roots_set(root, num, vroots);
-   ecore_x_netwm_desk_workareas_set(root, num, areas);
+   for (ml = e_manager_list(); ml; ml = ml->next)
+     {
+       m = ml->data;
+       ecore_x_netwm_desk_count_set(m->root, num);
+       ecore_x_netwm_desk_roots_set(m->root, num, vroots);
+       ecore_x_netwm_desk_workareas_set(m->root, num, areas);
+     }
    free(vroots);
    free(areas);
 }




-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to