Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_border.c e_border.h e_object.h 


Log Message:


and if apps are fast at requesting lots of geom just after map.. handle it
properly with respect to frames...

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -3 -r1.64 -r1.65
--- e_border.c  12 Jan 2005 16:03:08 -0000      1.64
+++ e_border.c  13 Jan 2005 06:08:07 -0000      1.65
@@ -358,6 +358,17 @@
    E_Event_Border_Move *ev;
 
    E_OBJECT_CHECK(bd);
+   if (bd->new_client)
+     {
+       E_Border_Pending_Move_Resize  *pnd;
+       
+       pnd = E_NEW(E_Border_Pending_Move_Resize, 1);
+       pnd->move = 1;
+       pnd->x = x;
+       pnd->y = y;
+       bd->pending_move_resize = evas_list_append(bd->pending_move_resize, 
pnd);
+       return;
+     }
    if ((x == bd->x) && (y == bd->y)) return;
    bd->x = x;
    bd->y = y;
@@ -380,6 +391,17 @@
 {
    E_Event_Border_Resize *ev;
    E_OBJECT_CHECK(bd);
+   if (bd->new_client)
+     {
+       E_Border_Pending_Move_Resize  *pnd;
+       
+       pnd = E_NEW(E_Border_Pending_Move_Resize, 1);
+       pnd->resize = 1;
+       pnd->w = w;
+       pnd->h = h;
+       bd->pending_move_resize = evas_list_append(bd->pending_move_resize, 
pnd);
+       return;
+     }
    if ((w == bd->w) && (h == bd->h)) return;
    bd->w = w;
    bd->h = h;
@@ -406,6 +428,20 @@
    E_Event_Border_Resize       *rev;
    
    E_OBJECT_CHECK(bd);
+   if (bd->new_client)
+     {
+       E_Border_Pending_Move_Resize  *pnd;
+       
+       pnd = E_NEW(E_Border_Pending_Move_Resize, 1);
+       pnd->move = 1;
+       pnd->resize = 1;
+       pnd->x = x;
+       pnd->y = y;
+       pnd->w = w;
+       pnd->h = h;
+       bd->pending_move_resize = evas_list_append(bd->pending_move_resize, 
pnd);
+       return;
+     }
    if ((x == bd->x) && (y == bd->y) && (w == bd->w) && (h == bd->h)) return;
    bd->x = x;
    bd->y = y;
@@ -809,6 +845,11 @@
 static void
 _e_border_free(E_Border *bd)
 {
+   while (bd->pending_move_resize)
+     {
+       free(bd->pending_move_resize->data);
+       bd->pending_move_resize = 
evas_list_remove_list(bd->pending_move_resize, bd->pending_move_resize);
+     }
    if (bd->border_menu)
      {
        e_object_del(E_OBJECT(bd->border_menu));
@@ -2100,6 +2141,7 @@
 
    if (bd->new_client)
      {
+       bd->new_client = 0;
        printf("##- NEW CLIENT SETUP 0x%x\n", bd->client.win);
        if (bd->re_manage)
          {
@@ -2181,6 +2223,28 @@
                  bd->changes.pos = 1;
               }
          }
+       while (bd->pending_move_resize)
+         {
+            E_Border_Pending_Move_Resize *pnd;
+            
+            pnd = bd->pending_move_resize->data;
+            if (pnd->move)
+              {
+                 bd->x = pnd->x - bd->client_inset.l;
+                 bd->y = pnd->y - bd->client_inset.t;
+                 bd->changes.pos = 1;
+              }
+            if (pnd->resize)
+              {
+                 bd->w = pnd->w + bd->client_inset.l + bd->client_inset.r;
+                 bd->h = pnd->h + bd->client_inset.t + bd->client_inset.b;
+                 bd->client.w = pnd->w;
+                 bd->client.h = pnd->h;
+                 bd->changes.size = 1;
+              }
+            free(pnd);
+            bd->pending_move_resize = 
evas_list_remove_list(bd->pending_move_resize, bd->pending_move_resize);
+         }
        ecore_x_icccm_move_resize_send(bd->client.win, 
                                       bd->x + bd->client_inset.l, 
                                       bd->y + bd->client_inset.t, 
@@ -2352,7 +2416,6 @@
        bd->changes.reset_gravity = 0;
      }
    
-   bd->new_client = 0;
    bd->changed = 0;
    
    bd->changes.stack = 0;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- e_border.h  12 Jan 2005 16:03:08 -0000      1.22
+++ e_border.h  13 Jan 2005 06:08:07 -0000      1.23
@@ -16,14 +16,15 @@
     E_TRANSITION_DECELERATE
 } E_Transition;
 
-typedef struct _E_Border                E_Border;
-typedef struct _E_Event_Border_Resize   E_Event_Border_Resize;
-typedef struct _E_Event_Border_Move     E_Event_Border_Move;
-typedef struct _E_Event_Border_Add      E_Event_Border_Add;
-typedef struct _E_Event_Border_Remove   E_Event_Border_Remove;
-typedef struct _E_Event_Border_Show     E_Event_Border_Show;
-typedef struct _E_Event_Border_Hide     E_Event_Border_Hide;
-typedef struct _E_Event_Border_Desk_Set E_Event_Border_Desk_Set;
+typedef struct _E_Border                     E_Border;
+typedef struct _E_Border_Pending_Move_Resize E_Border_Pending_Move_Resize;
+typedef struct _E_Event_Border_Resize        E_Event_Border_Resize;
+typedef struct _E_Event_Border_Move          E_Event_Border_Move;
+typedef struct _E_Event_Border_Add           E_Event_Border_Add;
+typedef struct _E_Event_Border_Remove        E_Event_Border_Remove;
+typedef struct _E_Event_Border_Show          E_Event_Border_Show;
+typedef struct _E_Event_Border_Hide          E_Event_Border_Hide;
+typedef struct _E_Event_Border_Desk_Set      E_Event_Border_Desk_Set;
 
 #else
 #ifndef E_BORDER_H
@@ -178,6 +179,7 @@
 
    Evas_List *stick_desks;
    E_Menu *border_menu;
+   Evas_List *pending_move_resize;
 
    struct {
       unsigned int visible : 1;
@@ -192,6 +194,13 @@
    } changes;
 };
 
+struct _E_Border_Pending_Move_Resize 
+{
+   int x, y, w, h;
+   unsigned char move : 1;
+   unsigned char resize : 1;
+};
+
 struct _E_Event_Border_Resize
 {
    E_Border *border;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_object.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- e_object.h  12 Jan 2005 16:03:08 -0000      1.10
+++ e_object.h  13 Jan 2005 06:08:07 -0000      1.11
@@ -1,4 +1,5 @@
 #ifdef E_TYPEDEFS
+
 /* Object safety/debugging checks */
 /* */
 /* OBJECT_PARANOIA_CHECK is paranoid and checkes pointers and traps segv's */
@@ -8,7 +9,7 @@
 /* OBJECT_CHECK is a simple null pointer and magic number check with no */
 /* debug output */
 
-#define OBJECT_PARANOIA_CHECK
+//#define OBJECT_PARANOIA_CHECK
 //#define OBJECT_CHECK
 
 #ifndef __GLIBC__




-------------------------------------------------------
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
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to