Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_border.c e_desk.c e_dnd.c e_dnd.h 


Log Message:


use the shadowed window tree from ecore

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.606
retrieving revision 1.607
diff -u -3 -r1.606 -r1.607
--- e_border.c  3 Oct 2007 07:13:02 -0000       1.606
+++ e_border.c  5 Oct 2007 12:11:55 -0000       1.607
@@ -227,6 +227,7 @@
 
    bd = E_OBJECT_ALLOC(E_Border, E_BORDER_TYPE, _e_border_free);
    if (!bd) return NULL;
+   ecore_x_window_shadow_tree_flush();
    e_object_del_func_set(E_OBJECT(bd), E_OBJECT_CLEANUP_FUNC(_e_border_del));
 
    bd->w = 1;
@@ -522,6 +523,7 @@
    if (!bd->pre_res_change.valid) return;
    if (bd->new_client) return;
    
+   ecore_x_window_shadow_tree_flush();
    memcpy(&pre_res_change, &bd->pre_res_change, sizeof(pre_res_change));
 
    if (bd->fullscreen)
@@ -641,6 +643,7 @@
    E_OBJECT_CHECK(desk);
    E_OBJECT_TYPE_CHECK(desk, E_DESK_TYPE);
    if (bd->desk == desk) return;
+   ecore_x_window_shadow_tree_flush();
    bd->desk = desk;
    e_border_zone_set(bd, desk->zone);
 
@@ -683,6 +686,7 @@
    E_OBJECT_CHECK(bd);
    E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
    if (bd->visible) return;
+   ecore_x_window_shadow_tree_flush();
    e_container_shape_show(bd->shape);
    if (!bd->need_reparent)
      ecore_x_window_show(bd->client.win);
@@ -709,6 +713,7 @@
    E_OBJECT_CHECK(bd);
    E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
    if (!bd->visible) return;
+   ecore_x_window_shadow_tree_flush();
    if (bd->moving)
      _e_border_move_end(bd);
    if (bd->fullscreen)
@@ -775,6 +780,7 @@
    if ((bd->fullscreen) || 
        (((bd->maximized & E_MAXIMIZE_TYPE) == E_MAXIMIZE_FULLSCREEN) && 
(!e_config->allow_manip))) 
      return;
+   ecore_x_window_shadow_tree_flush();
    if (bd->new_client)
      {
        E_Border_Pending_Move_Resize  *pnd;
@@ -852,6 +858,7 @@
    if ((bd->shaded) || (bd->shading) || (bd->fullscreen) ||
        (((bd->maximized & E_MAXIMIZE_TYPE) == E_MAXIMIZE_FULLSCREEN) && 
(!e_config->allow_manip)))
      return;
+   ecore_x_window_shadow_tree_flush();
    if (bd->new_client)
      {
        E_Border_Pending_Move_Resize  *pnd;
@@ -911,6 +918,7 @@
    if ((bd->fullscreen) || 
        (((bd->maximized & E_MAXIMIZE_TYPE) == E_MAXIMIZE_FULLSCREEN) && 
(!e_config->allow_manip))) 
           return;
+   ecore_x_window_shadow_tree_flush();
    if (bd->new_client)
      {
        E_Border_Pending_Move_Resize  *pnd;
@@ -979,6 +987,8 @@
    E_OBJECT_CHECK(bd);
    E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
 
+   ecore_x_window_shadow_tree_flush();
+   
    raise = e_config->transient.raise;
    
    bd->saved.layer = bd->layer;
@@ -1015,6 +1025,8 @@
    E_OBJECT_CHECK(bd);
    E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
 
+   ecore_x_window_shadow_tree_flush();
+   
    if (e_config->transient.raise)
      {
        for (l = evas_list_last(bd->transients); l; l = l->prev)
@@ -1102,6 +1114,8 @@
    E_OBJECT_CHECK(bd);
    E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
 
+   ecore_x_window_shadow_tree_flush();
+   
    if (e_config->transient.lower)
      {
        for (l = evas_list_last(bd->transients); l; l = l->prev)
@@ -1190,6 +1204,8 @@
    E_OBJECT_CHECK(bd);
    E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
 
+   ecore_x_window_shadow_tree_flush();
+   
    if (e_config->transient.raise)
      {
        for (l = evas_list_last(bd->transients); l; l = l->prev)
@@ -1246,6 +1262,8 @@
    E_OBJECT_CHECK(bd);
    E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
 
+   ecore_x_window_shadow_tree_flush();
+   
    if (e_config->transient.lower)
      {
        for (l = evas_list_last(bd->transients); l; l = l->prev)
@@ -1496,6 +1514,7 @@
        (bd->shading)) return;
    if ((bd->client.border.name) && 
        (!strcmp("borderless", bd->client.border.name))) return;
+   ecore_x_window_shadow_tree_flush();
    if (!bd->shaded)
      {
 //     printf("SHADE!\n");
@@ -1584,6 +1603,7 @@
    E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
    if ((bd->fullscreen) || ((bd->maximized) && (!e_config->allow_manip)) ||
        (bd->shading)) return;
+   ecore_x_window_shadow_tree_flush();
    if (bd->shaded)
      {
 //     printf("UNSHADE!\n");
@@ -1693,6 +1713,7 @@
    if (!(max & E_MAXIMIZE_DIRECTION)) max |= E_MAXIMIZE_BOTH;
 
    if ((bd->shaded) || (bd->shading)) return;
+   ecore_x_window_shadow_tree_flush();
    if (bd->fullscreen)
      e_border_unfullscreen(bd);
    /* Only allow changes in vertical/ horizontal maximization */
@@ -1855,6 +1876,7 @@
      }
 
    if ((bd->shaded) || (bd->shading)) return;
+   ecore_x_window_shadow_tree_flush();
    /* Remove directions not used */
    max &= (bd->maximized & E_MAXIMIZE_DIRECTION);
    /* Can only remove existing maximization directions */
@@ -1984,6 +2006,7 @@
    E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
 
    if ((bd->shaded) || (bd->shading)) return;
+   ecore_x_window_shadow_tree_flush();
    if (bd->maximized)
      e_border_unmaximize(bd, E_MAXIMIZE_BOTH);
    if (bd->new_client)
@@ -2075,6 +2098,7 @@
    E_OBJECT_CHECK(bd);
    E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
    if ((bd->shaded) || (bd->shading)) return;
+   ecore_x_window_shadow_tree_flush();
    if (bd->fullscreen)
      {
        bd->pre_res_change.valid = 0;
@@ -2112,6 +2136,7 @@
    E_OBJECT_CHECK(bd);
    E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
    if ((bd->fullscreen) || (bd->shading)) return;
+   ecore_x_window_shadow_tree_flush();
    if (!bd->iconic)
      {
        bd->iconic = 1;
@@ -2154,6 +2179,7 @@
    E_OBJECT_CHECK(bd);
    E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
    if ((bd->fullscreen) || (bd->shading)) return;
+   ecore_x_window_shadow_tree_flush();
    if (bd->iconic)
      {
        bd->iconic = 0;
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_desk.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -3 -r1.68 -r1.69
--- e_desk.c    26 Sep 2007 12:34:38 -0000      1.68
+++ e_desk.c    5 Oct 2007 12:11:55 -0000       1.69
@@ -208,6 +208,7 @@
    E_OBJECT_TYPE_CHECK(desk, E_DESK_TYPE);
    if (desk->visible) return;
 
+   ecore_x_window_shadow_tree_flush();
    for (x = 0; x < desk->zone->desk_x_count; x++)
      {
        for (y = 0; y < desk->zone->desk_y_count; y++)
@@ -326,6 +327,7 @@
 
    desk = e_desk_current_get(zone);
    bl = e_container_border_list_first(zone->container);
+   ecore_x_window_shadow_tree_flush();
    while ((bd = e_container_border_list_next(bl))) 
      {
        if (bd->desk == desk)
@@ -628,6 +630,7 @@
          }
      }
    e_container_border_list_free(bl);
+   ecore_x_window_shadow_tree_flush();
 }
 
 static int
@@ -769,6 +772,7 @@
          }
      }
    e_container_border_list_free(bl);
+   ecore_x_window_shadow_tree_flush();
 }
 
 static int
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_dnd.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -3 -r1.62 -r1.63
--- e_dnd.c     18 Aug 2007 10:37:16 -0000      1.62
+++ e_dnd.c     5 Oct 2007 12:11:55 -0000       1.63
@@ -22,9 +22,9 @@
 static int  _e_drag_win_matches(E_Drop_Handler *h, Ecore_X_Window win);
 static void _e_drag_win_show(E_Drop_Handler *h);
 static void _e_drag_win_hide(E_Drop_Handler *h);
-static void _e_drag_update(int x, int y);
-static void _e_drag_end(int x, int y);
-static void _e_drag_xdnd_end(int x, int y);
+static void _e_drag_update(Ecore_X_Window root, int x, int y);
+static void _e_drag_end(Ecore_X_Window root, int x, int y);
+static void _e_drag_xdnd_end(Ecore_X_Window root, int x, int y);
 static void _e_drag_free(E_Drag *drag);
 
 static int  _e_dnd_cb_window_shape(void *data, int type, void *event);
@@ -193,6 +193,8 @@
 
    _drag_list = evas_list_append(_drag_list, drag);
 
+   ecore_x_window_shadow_tree_flush();
+   
    return drag;
 }
 
@@ -216,8 +218,7 @@
    if ((drag->x == x) && (drag->y == y)) return;
    drag->x = x;
    drag->y = y;
-   ecore_evas_move(drag->ecore_evas, drag->x, drag->y);
-   e_container_shape_move(drag->shape, drag->x, drag->y);
+   drag->xy_update = 1;
 }
 
 EAPI void
@@ -475,6 +476,12 @@
             if (drag->visible)
               e_container_shape_show(drag->shape);
          }
+        if (drag->xy_update)
+         {
+            ecore_evas_move(drag->ecore_evas, drag->x, drag->y);
+            e_container_shape_move(drag->shape, drag->x, drag->y);
+            drag->xy_update = 0;
+         }
      }
 }
 
@@ -512,12 +519,7 @@
    
    drag->x = x - drag->dx;
    drag->y = y - drag->dy;
-   ecore_evas_move(drag->ecore_evas,
-                  drag->x, 
-                  drag->y);
-   e_container_shape_move(drag->shape,
-                         drag->x, 
-                         drag->y);
+   drag->xy_update = 1;
 }
 
 static void
@@ -642,7 +644,7 @@
 }
 
 static void
-_e_drag_update(int x, int y)
+_e_drag_update(Ecore_X_Window root, int x, int y)
 {
    Evas_List *l;
    E_Event_Dnd_Enter enter_ev;
@@ -655,11 +657,18 @@
      {
        ignore_win[0] = _drag_current->evas_win;
        ignore_win[1] = _drag_win;
-       /* this is nasty - but necessary to get the window stacking */
-       win = ecore_x_window_at_xy_with_skip_get(x, y, ignore_win, 2);
+       /* FIXME: this is nasty. every x mouse event we go back to x and do
+        * a whole bunch of round-trips narrowing down the toplevel window
+        * which contains the mouse */
+       win = ecore_x_window_shadow_tree_at_xy_with_skip_get(root, x, y, 
ignore_win, 2);
+//     win = ecore_x_window_at_xy_with_skip_get(x, y, ignore_win, 2);
      }
    else
-     win = ecore_x_window_at_xy_with_skip_get(x, y, NULL, 0);
+     /* FIXME: this is nasty. every x mouse event we go back to x and do
+      * a whole bunch of round-trips narrowing down the toplevel window
+      * which contains the mouse */
+     win = ecore_x_window_shadow_tree_at_xy_with_skip_get(root, x, y, NULL, 0);
+//     win = ecore_x_window_at_xy_with_skip_get(x, y, NULL, 0);
    
    if (_drag_current)
      {
@@ -756,7 +765,7 @@
 }
 
 static void
-_e_drag_end(int x, int y)
+_e_drag_end(Ecore_X_Window root, int x, int y)
 {
    E_Zone *zone;
    Evas_List *l;
@@ -768,7 +777,8 @@
    ignore_win[0] = _drag_current->evas_win;
    ignore_win[1] = _drag_win;
    /* this is nasty - but necessary to get the window stacking */
-   win = ecore_x_window_at_xy_with_skip_get(x, y, ignore_win, 2);
+   win = ecore_x_window_shadow_tree_at_xy_with_skip_get(root, x, y, 
ignore_win, 2);
+//   win = ecore_x_window_at_xy_with_skip_get(x, y, ignore_win, 2);
    zone = e_container_zone_at_point_get(_drag_current->container, x, y);
    /* Pass -1, -1, so that it is possible to drop at the edge. */
    if (zone) e_zone_flip_coords_handle(zone, -1, -1);
@@ -863,7 +873,7 @@
 }
 
 static void
-_e_drag_xdnd_end(int x, int y)
+_e_drag_xdnd_end(Ecore_X_Window root, int x, int y)
 {
    Evas_List *l;
    E_Event_Dnd_Drop ev;
@@ -875,11 +885,12 @@
      {
        ignore_win[0] = _drag_current->evas_win;
        ignore_win[1] = _drag_win;
-       /* this is nasty - but necessary to get the window stacking */
-       win = ecore_x_window_at_xy_with_skip_get(x, y, ignore_win, 2);
+       win = ecore_x_window_shadow_tree_at_xy_with_skip_get(root, x, y, 
ignore_win, 2);
+//     win = ecore_x_window_at_xy_with_skip_get(x, y, ignore_win, 2);
      }
    else
-     win = ecore_x_window_at_xy_with_skip_get(x, y, NULL, 0);
+     win = ecore_x_window_shadow_tree_at_xy_with_skip_get(root, x, y, NULL, 0);
+//     win = ecore_x_window_at_xy_with_skip_get(x, y, NULL, 0);
 
    ev.data = _xdnd->data;
 
@@ -951,6 +962,7 @@
    for (i = 0; i < drag->num_types; i++) free(drag->types[i]);
    free(drag->types);
    free(drag);
+   ecore_x_window_shadow_tree_flush();
 }
 
 
@@ -980,7 +992,7 @@
    ev = event;
    if (ev->win != _drag_win) return 1;
 
-   _e_drag_end(ev->x, ev->y);
+   _e_drag_end(ecore_x_window_root_get(ev->win), ev->x, ev->y);
 
    return 1;
 }
@@ -993,7 +1005,7 @@
    ev = event;
    if (ev->win != _drag_win) return 1;
 
-   _e_drag_update(ev->x, ev->y);
+   _e_drag_update(ecore_x_window_root_get(ev->win), ev->x, ev->y);
    return 1;
 }
 
@@ -1148,7 +1160,7 @@
      }
    else
      {
-       _e_drag_update(ev->position.x, ev->position.y);
+       _e_drag_update(ecore_x_window_root_get(ev->win), ev->position.x, 
ev->position.y);
        ecore_x_dnd_send_status(1, 0, rect, ECORE_X_DND_ACTION_PRIVATE);
      }
    return 1;
@@ -1230,7 +1242,7 @@
        for (i = 0; i < files->num_files; i++)
          l = evas_list_append(l, files->files[i]), printf("file: %s\n", 
files->files[i]);
        _xdnd->data = l;
-       _e_drag_xdnd_end(_xdnd->x, _xdnd->y);
+       _e_drag_xdnd_end(ecore_x_window_root_get(ev->win), _xdnd->x, _xdnd->y);
        evas_list_free(l);
      }
    else if (!strcmp("text/x-moz-url", _xdnd->type))
@@ -1269,12 +1281,12 @@
        l = evas_list_append(l, file);
 
        _xdnd->data = l;
-       _e_drag_xdnd_end(_xdnd->x, _xdnd->y);
+       _e_drag_xdnd_end(ecore_x_window_root_get(ev->win), _xdnd->x, _xdnd->y);
        evas_list_free(l);
      }
    else
      {
-       _e_drag_xdnd_end(_xdnd->x, _xdnd->y);
+       _e_drag_xdnd_end(ecore_x_window_root_get(ev->win), _xdnd->x, _xdnd->y);
      }
    /* FIXME: When to execute this? It could be executed in ecore_x after 
getting
     * the drop property... */
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_dnd.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- e_dnd.h     7 Jan 2007 16:32:57 -0000       1.30
+++ e_dnd.h     5 Oct 2007 12:11:55 -0000       1.31
@@ -56,6 +56,7 @@
    unsigned int   layer;
    unsigned char  visible : 1;
    unsigned char  need_shape_export : 1;
+   unsigned char  xy_update : 1;
 };
 
 struct _E_Drop_Handler



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to