Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


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


Log Message:


fix flip

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.342
retrieving revision 1.343
diff -u -3 -r1.342 -r1.343
--- e_border.c  26 Jul 2005 04:06:28 -0000      1.342
+++ e_border.c  27 Jul 2005 04:51:41 -0000      1.343
@@ -558,11 +558,7 @@
    E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
    if (!bd->visible) return;
    if (bd->moving)
-     {
-       bd->moving = 0;
-       _e_border_move_end(bd);
-       e_zone_flip_coords_handle(bd->zone, -1, -1);
-     }
+     _e_border_move_end(bd);
    if (bd->fullscreen)
      e_border_unfullscreen(bd);
    if (bd->resize_mode != RESIZE_NONE)
@@ -1603,6 +1599,7 @@
        if (!_e_border_move_begin(bd))
          return;
 
+       e_zone_flip_win_disable();
        bd->moving = 1;
        if (ev)
          {
@@ -1619,6 +1616,7 @@
 {
    if (bd->moving)
      {
+       e_zone_flip_win_restore();
        bd->moving = 0;
        _e_border_move_end(bd);
        e_zone_flip_coords_handle(bd->zone, -1, -1);
@@ -2882,6 +2880,7 @@
        if (!_e_border_move_begin(bd))
          return 1;
        bd->moving = 1;
+       e_zone_flip_win_disable();
        
        bd->cur_mouse_action = e_action_find("window_move");
        if (bd->cur_mouse_action)
@@ -2965,6 +2964,7 @@
    if (!_e_border_move_begin(bd))
      return;
    bd->moving = 1;
+   e_zone_flip_win_disable();
    _e_border_moveinfo_gather(bd, source);
 }
 
@@ -2976,6 +2976,7 @@
    bd = data;
    if (!bd->moving) return;
    bd->moving = 0;
+   e_zone_flip_win_restore();
    _e_border_move_end(bd);
    e_zone_flip_coords_handle(bd->zone, -1, -1);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_zone.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -3 -r1.68 -r1.69
--- e_zone.c    20 Jul 2005 13:07:57 -0000      1.68
+++ e_zone.c    27 Jul 2005 04:51:42 -0000      1.69
@@ -264,33 +264,29 @@
    if ((y == 0) && E_ZONE_FLIP_UP(zone))
      {
        /* top */
-       if (zone->flip.timer)
-         ecore_timer_del(zone->flip.timer);
-       zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout, 
_e_zone_cb_timer, zone);
+       if (!zone->flip.timer)
+         zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout, 
_e_zone_cb_timer, zone);
        zone->flip.direction = E_DIRECTION_UP;
      }
    else if ((x == (zone->w - 1)) && E_ZONE_FLIP_RIGHT(zone))
      {
        /* right */
-       if (zone->flip.timer)
-         ecore_timer_del(zone->flip.timer);
-       zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout, 
_e_zone_cb_timer, zone);
+       if (!zone->flip.timer)
+         zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout, 
_e_zone_cb_timer, zone);
        zone->flip.direction = E_DIRECTION_RIGHT;
      }
    else if ((y == (zone->h - 1)) && E_ZONE_FLIP_DOWN(zone))
      {
        /* bottom */
-       if (zone->flip.timer)
-         ecore_timer_del(zone->flip.timer);
-       zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout, 
_e_zone_cb_timer, zone);
+       if (!zone->flip.timer)
+         zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout, 
_e_zone_cb_timer, zone);
        zone->flip.direction = E_DIRECTION_DOWN;
      }
    else if ((x == 0) && E_ZONE_FLIP_LEFT(zone))
      {
        /* left */
-       if (zone->flip.timer)
-         ecore_timer_del(zone->flip.timer);
-       zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout, 
_e_zone_cb_timer, zone);
+       if (!zone->flip.timer)
+         zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout, 
_e_zone_cb_timer, zone);
        zone->flip.direction = E_DIRECTION_LEFT;
      }
    else
@@ -483,6 +479,57 @@
    e_zone_desk_flip_to(zone, x, y);
 }
 
+void
+e_zone_flip_win_disable(void)
+{
+   Evas_List *l, *ll, *lll;
+   E_Manager *man;
+   E_Container *con;
+   
+   for (l = e_manager_list(); l; l = l->next)
+     {
+       man = l->data;
+       for (ll = man->containers; ll; ll = ll->next)
+         {
+            con = ll->data;
+            for (lll = con->zones; lll; lll = lll->next)
+              {
+                 E_Zone *zone;
+                 
+                 zone = lll->data;
+                 ecore_x_window_hide(zone->flip.left);
+                 ecore_x_window_hide(zone->flip.right);
+                 ecore_x_window_hide(zone->flip.top);
+                 ecore_x_window_hide(zone->flip.bottom);
+              }
+         }
+     }
+}
+
+void
+e_zone_flip_win_restore(void)
+{
+   Evas_List *l, *ll, *lll;
+   E_Manager *man;
+   E_Container *con;
+   
+   for (l = e_manager_list(); l; l = l->next)
+     {
+       man = l->data;
+       for (ll = man->containers; ll; ll = ll->next)
+         {
+            con = ll->data;
+            for (lll = con->zones; lll; lll = lll->next)
+              {
+                 E_Zone *zone;
+                 
+                 zone = lll->data;
+                 _e_zone_update_flip(zone);
+              }
+         }
+     }
+}
+
 int
 e_zone_app_exec(E_Zone *zone, E_App *a)
 {
@@ -706,30 +753,26 @@
 
    if (ev->win == zone->flip.top)
      {
-       if (zone->flip.timer)
-         ecore_timer_del(zone->flip.timer);
-       zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout, 
_e_zone_cb_timer, zone);
+       if (!zone->flip.timer)
+         zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout, 
_e_zone_cb_timer, zone);
        zone->flip.direction = E_DIRECTION_UP;
      }
    else if (ev->win == zone->flip.right)
      {
-       if (zone->flip.timer)
-         ecore_timer_del(zone->flip.timer);
-       zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout, 
_e_zone_cb_timer, zone);
+       if (!zone->flip.timer)
+         zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout, 
_e_zone_cb_timer, zone);
        zone->flip.direction = E_DIRECTION_RIGHT;
      }
    else if (ev->win == zone->flip.bottom)
      {
-       if (zone->flip.timer)
-         ecore_timer_del(zone->flip.timer);
-       zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout, 
_e_zone_cb_timer, zone);
+       if (!zone->flip.timer)
+         zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout, 
_e_zone_cb_timer, zone);
        zone->flip.direction = E_DIRECTION_DOWN;
      }
    else if (ev->win == zone->flip.left)
      {
-       if (zone->flip.timer)
-         ecore_timer_del(zone->flip.timer);
-       zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout, 
_e_zone_cb_timer, zone);
+       if (!zone->flip.timer)
+         zone->flip.timer = ecore_timer_add(e_config->edge_flip_timeout, 
_e_zone_cb_timer, zone);
        zone->flip.direction = E_DIRECTION_LEFT;
      }
    return 1;
@@ -744,10 +787,15 @@
    ev = event;
    zone = data;
 
-   if (zone->flip.timer)
-     ecore_timer_del(zone->flip.timer);
-   zone->flip.timer = NULL;
-
+   if ((ev->win == zone->flip.top) ||
+       (ev->win == zone->flip.bottom) ||
+       (ev->win == zone->flip.left) ||
+       (ev->win == zone->flip.right))
+     {
+       if (zone->flip.timer)
+         ecore_timer_del(zone->flip.timer);
+       zone->flip.timer = NULL;
+     }
    return 1;
 }
 
@@ -759,6 +807,7 @@
    E_Event_Pointer_Warp *ev;
    int x, y;
 
+   printf("_e_zone_cb_timer()\n");
    ev = E_NEW(E_Event_Pointer_Warp, 1);
    if (!ev) return 0;
 
@@ -772,7 +821,7 @@
    switch (zone->flip.direction)
      {
       case E_DIRECTION_UP:
-        if (E_ZONE_FLIP_UP(zone))
+       if (E_ZONE_FLIP_UP(zone))
           {
              current = e_desk_at_xy_get(zone, zone->desk_x_current, 
zone->desk_y_current - 1);
              if (current)
@@ -783,55 +832,58 @@
                   ev->curr.y = zone->h - 2;
                }
           }
-        break;
+       break;
       case E_DIRECTION_RIGHT:
-        if (E_ZONE_FLIP_RIGHT(zone))
-          {
-             current = e_desk_at_xy_get(zone, zone->desk_x_current + 1, 
zone->desk_y_current);
-             if (current)
-               {
-                  e_desk_show(current);
-                  ecore_x_pointer_warp(zone->container->win, 2, y);
-                  ev->curr.y = y;
-                  ev->curr.x = 2;
-               }
-          }
-        break;
+       printf("clip right...\n");
+       if (E_ZONE_FLIP_RIGHT(zone))
+         {
+            printf("ummm...\n");
+            current = e_desk_at_xy_get(zone, zone->desk_x_current + 1, 
zone->desk_y_current);
+            if (current)
+              {
+                 printf("show new desk\n");
+                 e_desk_show(current);
+                 ecore_x_pointer_warp(zone->container->win, 2, y);
+                 ev->curr.y = y;
+                 ev->curr.x = 2;
+              }
+         }
+       break;
       case E_DIRECTION_DOWN:
-        if (E_ZONE_FLIP_DOWN(zone))
-          {
-             current = e_desk_at_xy_get(zone, zone->desk_x_current, 
zone->desk_y_current + 1);
-             if (current)
-               {
-                  e_desk_show(current);
-                  ecore_x_pointer_warp(zone->container->win, x, 2);
-                  ev->curr.x = x;
-                  ev->curr.y = 2;
-               }
-          }
-        break;
+       if (E_ZONE_FLIP_DOWN(zone))
+         {
+            current = e_desk_at_xy_get(zone, zone->desk_x_current, 
zone->desk_y_current + 1);
+            if (current)
+              {
+                 e_desk_show(current);
+                 ecore_x_pointer_warp(zone->container->win, x, 2);
+                 ev->curr.x = x;
+                 ev->curr.y = 2;
+              }
+         }
+       break;
       case E_DIRECTION_LEFT:
-        if (E_ZONE_FLIP_LEFT(zone))
-          {
-             current = e_desk_at_xy_get(zone, zone->desk_x_current - 1, 
zone->desk_y_current);
-             if (current)
-               {
-                  e_desk_show(current);
-                  ecore_x_pointer_warp(zone->container->win, zone->w - 2, y);
-                  ev->curr.y = y;
-                  ev->curr.x = zone->w - 2;
-               }
-          }
-        break;
+       if (E_ZONE_FLIP_LEFT(zone))
+         {
+            current = e_desk_at_xy_get(zone, zone->desk_x_current - 1, 
zone->desk_y_current);
+            if (current)
+              {
+                 e_desk_show(current);
+                 ecore_x_pointer_warp(zone->container->win, zone->w - 2, y);
+                 ev->curr.y = y;
+                 ev->curr.x = zone->w - 2;
+              }
+         }
+       break;
      }
-
+   
    zone->flip.timer = NULL;
-
+   
    if (current)
      ecore_event_add(E_EVENT_POINTER_WARP, ev, NULL, NULL);
    else
      free(ev);
-
+   
    return 0;
 }
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_zone.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- e_zone.h    20 Jul 2005 13:07:58 -0000      1.31
+++ e_zone.h    27 Jul 2005 04:51:42 -0000      1.32
@@ -86,9 +86,11 @@
 EAPI void       e_zone_desk_flip_to(E_Zone *zone, int x, int y);
 EAPI void       e_zone_desk_linear_flip_by(E_Zone *zone, int dx);
 EAPI void       e_zone_desk_linear_flip_to(E_Zone *zone, int x);
+EAPI void       e_zone_flip_win_disable(void);
+EAPI void       e_zone_flip_win_restore(void);
 
 EAPI int        e_zone_app_exec(E_Zone *zone, E_App *a);
-    
+
 extern EAPI int E_EVENT_ZONE_DESK_COUNT_SET;
 extern EAPI int E_EVENT_POINTER_WARP;
 




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to