Enlightenment CVS committal

Author  : sebastid
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_border.c e_border.h e_theme.h e_zone.h 


Log Message:
* Add missing prototypes.
* Store client_leader info.
* Honour modal windows for group.

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.384
retrieving revision 1.385
diff -u -3 -r1.384 -r1.385
--- e_border.c  2 Sep 2005 09:25:53 -0000       1.384
+++ e_border.c  2 Sep 2005 09:56:01 -0000       1.385
@@ -537,7 +537,7 @@
    if (e_config->transient.desktop)
      {
        Evas_List *l;
-       for (l = bd->children; l; l = l->next)
+       for (l = bd->transients; l; l = l->next)
          {
             E_Border *child;
 
@@ -813,10 +813,10 @@
        /* We need to set raise to one, else the child wont
         * follow to the new layer. It should be like this,
         * even if the user usually doesn't want to raise
-        * the children.
+        * the transients.
         */
        e_config->transient.raise = 1;
-       for (l = bd->children; l; l = l->next)
+       for (l = bd->transients; l; l = l->next)
          {
             E_Border *child;
 
@@ -861,12 +861,12 @@
    if (e_config->transient.raise)
      {
        Evas_List *l;
-       for (l = bd->children; l; l = l->next)
+       for (l = bd->transients; l; l = l->next)
          {
             E_Border *child;
 
             child = l->data;
-            /* Don't raise iconic children. If the user wants these shown,
+            /* Don't raise iconic transients. If the user wants these shown,
              * thats another option.
              */
             if (!child->iconic)
@@ -907,7 +907,7 @@
    if (e_config->transient.lower)
      {
        Evas_List *l;
-       for (l = bd->children; l; l = l->next)
+       for (l = bd->transients; l; l = l->next)
          {
             E_Border *child;
 
@@ -978,6 +978,11 @@
        e_border_focus_set(bd->modal, focus, set);
        return;
      }
+   else if ((bd->leader) && (bd->leader->modal))
+     {
+       e_border_focus_set(bd->leader->modal, focus, set);
+       return;
+     }
    if ((bd->visible) && (bd->changes.visible))
      {  
        if ((bd->want_focus) && (set) && (!focus))
@@ -1562,7 +1567,7 @@
      {
        Evas_List *l;
 
-       for (l = bd->children; l; l = l->next)
+       for (l = bd->transients; l; l = l->next)
          {
             E_Border *child;
 
@@ -1603,7 +1608,7 @@
      {
        Evas_List *l;
 
-       for (l = bd->children; l; l = l->next)
+       for (l = bd->transients; l; l = l->next)
          {
             E_Border *child;
 
@@ -2317,7 +2322,7 @@
 
    if (bd->parent)
      {
-       bd->parent->children = evas_list_remove(bd->parent->children, bd);
+       bd->parent->transients = evas_list_remove(bd->parent->transients, bd);
        if (bd->parent->modal == bd)
          {
             bd->parent->modal = NULL;
@@ -2325,13 +2330,32 @@
               e_border_focus_set(bd->parent, 1, 1);
          }
      }
-   while (bd->children)
+   while (bd->transients)
      {
        E_Border *child;
 
-       child = bd->children->data;
+       child = bd->transients->data;
        child->parent = NULL;
-       bd->children = evas_list_remove_list(bd->children, bd->children);
+       bd->transients = evas_list_remove_list(bd->transients, bd->transients);
+     }
+
+   if (bd->leader)
+     {
+       bd->leader->group = evas_list_remove(bd->leader->group, bd);
+       if (bd->leader->modal == bd)
+         {
+            bd->leader->modal = NULL;
+            if (bd->focused)
+              e_border_focus_set(bd->leader, 1, 1);
+         }
+     }
+   while (bd->group)
+     {
+       E_Border *child;
+
+       child = bd->group->data;
+       child->leader = NULL;
+       bd->group = evas_list_remove_list(bd->group, bd->group);
      }
 }
 
@@ -4719,6 +4743,12 @@
    if (bd->new_client)
      {
        bd->new_client = 0;
+       if ((bd->client.icccm.transient_for) && 
(bd->client.icccm.client_leader))
+         {
+            e_error_dialog_show(_("ICCCM error"),
+                                _("Weird, this window is transient and has a 
leader: %s\n",
+                                  e_border_name_get(bd)));
+         }
        if (bd->client.icccm.transient_for)
          {
             E_Border *bd_parent;
@@ -4726,12 +4756,25 @@
             bd_parent = 
e_border_find_by_client_window(bd->client.icccm.transient_for);
             if (bd_parent)
               {
-                 bd_parent->children = evas_list_append(bd_parent->children, 
bd);
+                 bd_parent->transients = 
evas_list_append(bd_parent->transients, bd);
                  bd->parent = bd_parent;
                  if (bd->client.netwm.state.modal)
                    bd->parent->modal = bd;
               }
          }
+       if (bd->client.icccm.client_leader)
+         {
+            E_Border *bd_leader;
+
+            bd_leader = 
e_border_find_by_client_window(bd->client.icccm.client_leader);
+            if (bd_leader)
+              {
+                 bd_leader->group = evas_list_append(bd_leader->group, bd);
+                 bd->leader = bd_leader;
+                 if (bd->client.netwm.state.modal)
+                   bd->leader->modal = bd;
+              }
+         }
 //     printf("##- NEW CLIENT SETUP 0x%x\n", bd->client.win);
        if (bd->re_manage)
          {
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.h,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -3 -r1.108 -r1.109
--- e_border.h  2 Sep 2005 09:25:53 -0000       1.108
+++ e_border.h  2 Sep 2005 09:56:01 -0000       1.109
@@ -385,9 +385,13 @@
    Ecore_X_Rectangle *shape_rects;
    E_Remember *remember;
 
-   E_Border *parent;
    E_Border *modal;
-   Evas_List *children;
+
+   E_Border  *leader;
+   Evas_List *group;
+
+   E_Border  *parent;
+   Evas_List *transients;
 };
 
 struct _E_Border_Pending_Move_Resize 
@@ -515,7 +519,7 @@
 
 EAPI void      e_border_idler_before(void);
 
-EAPI Evas_List *e_border_clients_get();
+EAPI Evas_List *e_border_clients_get(void);
 
 EAPI void e_border_act_move_begin(E_Border *bd, 
Ecore_X_Event_Mouse_Button_Down *ev);
 EAPI void e_border_act_move_end(E_Border *bd, Ecore_X_Event_Mouse_Button_Up 
*ev);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_theme.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_theme.h   11 Jul 2005 12:43:27 -0000      1.3
+++ e_theme.h   2 Sep 2005 09:56:01 -0000       1.4
@@ -16,6 +16,7 @@
 EAPI void       e_theme_config_set(const char *category, const char *file);
 EAPI E_Config_Theme *e_theme_config_get(const char *category);
 EAPI void       e_theme_config_remove(const char *category);
+EAPI void        e_theme_about(E_Zone *zone, const char *file);
 EAPI Evas_List *e_theme_config_list(void);
     
 #endif
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_zone.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- e_zone.h    27 Jul 2005 04:51:42 -0000      1.32
+++ e_zone.h    2 Sep 2005 09:56:01 -0000       1.33
@@ -71,6 +71,7 @@
 EAPI int        e_zone_init(void);
 EAPI int        e_zone_shutdown(void);
 EAPI E_Zone    *e_zone_new(E_Container *con, int num, int x, int y, int w, int 
h);
+EAPI void       e_zone_name_set(E_Zone *zone, const char *name);
 EAPI void       e_zone_move(E_Zone *zone, int x, int y);
 EAPI void       e_zone_resize(E_Zone *zone, int w, int h);
 EAPI void       e_zone_move_resize(E_Zone *zone, int x, int y, int w, int h);




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to