Honour modal windows.
authorsebastid <sebastid>
Fri, 2 Sep 2005 09:25:53 +0000 (09:25 +0000)
committersebastid <sebastid@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 2 Sep 2005 09:25:53 +0000 (09:25 +0000)
SVN revision: 16463

src/bin/e_border.c
src/bin/e_border.h

index 5381c7c1d51fff194102e7548dbe1dbd7ddb359e..b8bdf6832443f2d1073516b96fa6c960360acfe4 100644 (file)
@@ -973,6 +973,11 @@ e_border_focus_set(E_Border *bd, int focus, int set)
    E_OBJECT_CHECK(bd);
    E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
    //printf("e_border_focus_set(%p, %i %i);\n", bd, focus, set);
+   if (bd->modal)
+     {
+       e_border_focus_set(bd->modal, focus, set);
+       return;
+     }
    if ((bd->visible) && (bd->changes.visible))
      {  
        if ((bd->want_focus) && (set) && (!focus))
@@ -2311,7 +2316,15 @@ _e_border_del(E_Border *bd)
      }
 
    if (bd->parent)
-     bd->parent->children = evas_list_remove(bd->parent->children, bd);
+     {
+       bd->parent->children = evas_list_remove(bd->parent->children, bd);
+       if (bd->parent->modal == bd)
+         {
+            bd->parent->modal = NULL;
+            if (bd->focused)
+              e_border_focus_set(bd->parent, 1, 1);
+         }
+     }
    while (bd->children)
      {
        E_Border *child;
@@ -4715,6 +4728,8 @@ _e_border_eval(E_Border *bd)
               {
                  bd_parent->children = evas_list_append(bd_parent->children, bd);
                  bd->parent = bd_parent;
+                 if (bd->client.netwm.state.modal)
+                   bd->parent->modal = bd;
               }
          }
 //     printf("##- NEW CLIENT SETUP 0x%x\n", bd->client.win);
index 46352eb225aebcb20caeb3570dfa43fda29e6f0d..b951a4ea4cbe808e29ec00d2047866fa9d4dde52 100644 (file)
@@ -386,6 +386,7 @@ struct _E_Border
    E_Remember *remember;
 
    E_Border *parent;
+   E_Border *modal;
    Evas_List *children;
 };