remove E_Comp->x/y
authorMike Blumenkrantz <zmike@osg.samsung.com>
Thu, 19 Mar 2015 20:59:59 +0000 (16:59 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Thu, 19 Mar 2015 20:59:59 +0000 (16:59 -0400)
canvas coords start at 0,0...always

src/bin/e_actions.c
src/bin/e_comp.c
src/bin/e_comp.h
src/bin/e_comp_x.c
src/bin/e_dnd.c
src/modules/access/e_mod_main.c

index 89da676..671ef65 100644 (file)
@@ -1850,8 +1850,6 @@ ACT_FN_GO_MOUSE(menu_show, )
                   m->zone = zone;
                   x = ev->canvas.x;
                   y = ev->canvas.y;
-                  x -= e_comp->x;
-                  y -= e_comp->y;
                   e_menu_post_deactivate_callback_set(m, _e_actions_cb_menu_end, NULL);
                   e_menu_activate_mouse(m, zone, x, y, 1, 1,
                                         E_MENU_POP_DIRECTION_DOWN, ev->timestamp);
index 7af340a..9a441f7 100644 (file)
@@ -633,7 +633,7 @@ _e_comp_shapes_update_comp_client_shape_comp_helper(E_Client *ec, Eina_Tiler *tb
           {
              x = rect->x, y = rect->y, w = rect->w, h = rect->h;
              x += ec->client.x, y += ec->client.y;
-             E_RECTS_CLIP_TO_RECT(x, y, w, h, e_comp->x, e_comp->y, e_comp->w, e_comp->h);
+             E_RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, e_comp->w, e_comp->h);
              if ((w < 1) || (h < 1)) continue;
    //#ifdef SHAPE_DEBUG not sure we can shape check these?
              //r = E_NEW(Eina_Rectangle, 1);
@@ -1450,7 +1450,7 @@ e_comp_block_window_add(void)
 {
    e_comp->block_count++;
    if (e_comp->block_win) return;
-   e_comp->block_win = ecore_x_window_new(e_comp->root, e_comp->x, e_comp->y, e_comp->w, e_comp->h);
+   e_comp->block_win = ecore_x_window_new(e_comp->root, 0, 0, e_comp->w, e_comp->h);
    INF("BLOCK WIN: %x", e_comp->block_win);
    ecore_x_window_background_color_set(e_comp->block_win, 0, 0, 0);
    e_comp_ignore_win_add(e_comp->block_win);
index 3669fcb..b1d00c2 100644 (file)
@@ -60,7 +60,7 @@ typedef void (*E_Comp_Grab_Cb)(void);
 struct _E_Comp
 {
    E_Object e_obj_inherit;
-   int x, y, w, h;
+   int w, h;
 
    Ecore_Window  win; // input overlay
    Ecore_Window  root;
index f68224c..039e2a7 100644 (file)
@@ -1473,13 +1473,13 @@ _e_comp_x_configure_request(void *data  EINA_UNUSED, int type EINA_UNUSED, Ecore
         else
           {
              /* client is completely outside the screen, policy does not allow */
-             if (((!E_INTERSECTS(x, y, ec->w, ec->h, e_comp->x, e_comp->y, e_comp->w - 5, e_comp->h - 5)) &&
+             if (((!E_INTERSECTS(x, y, ec->w, ec->h, 0, 0, e_comp->w - 5, e_comp->h - 5)) &&
                  (e_config->screen_limits != E_CLIENT_OFFSCREEN_LIMIT_ALLOW_FULL)) ||
                  /* client is partly outside the zone, policy does not allow */
-                 (((!E_INSIDE(x, y, e_comp->x, e_comp->y, e_comp->w - 5, e_comp->h - 5)) &&
-                  (!E_INSIDE(x + ec->w, y, e_comp->x, e_comp->y, e_comp->w - 5, e_comp->h - 5)) &&
-                  (!E_INSIDE(x, y + ec->h, e_comp->x, e_comp->y, e_comp->w - 5, e_comp->h - 5)) &&
-                  (!E_INSIDE(x + ec->w, y + ec->h, e_comp->x, e_comp->y, e_comp->w - 5, e_comp->h - 5))) &&
+                 (((!E_INSIDE(x, y, 0, 0, e_comp->w - 5, e_comp->h - 5)) &&
+                  (!E_INSIDE(x + ec->w, y, 0, 0, e_comp->w - 5, e_comp->h - 5)) &&
+                  (!E_INSIDE(x, y + ec->h, 0, 0, e_comp->w - 5, e_comp->h - 5)) &&
+                  (!E_INSIDE(x + ec->w, y + ec->h, 0, 0, e_comp->w - 5, e_comp->h - 5))) &&
                   (e_config->screen_limits == E_CLIENT_OFFSCREEN_LIMIT_ALLOW_NONE))
                 )
                e_comp_object_util_center(ec->frame);
index a3768a7..b28696c 100644 (file)
@@ -275,7 +275,7 @@ e_drag_start(E_Drag *drag, int x, int y)
    if (_drag_win) return 0;
 #ifndef HAVE_WAYLAND_ONLY
    _drag_win = ecore_x_window_input_new(e_comp->win,
-                                        e_comp->x, e_comp->y,
+                                        0, 0,
                                         e_comp->w, e_comp->h);
    ecore_event_window_register(_drag_win, e_comp->ee, e_comp->evas,
                                  NULL, NULL, NULL, NULL);
@@ -341,7 +341,7 @@ e_drag_xdnd_start(E_Drag *drag, int x, int y)
 #ifndef HAVE_WAYLAND_ONLY
    if (e_comp->comp_type != E_PIXMAP_TYPE_X) return 0;
    _drag_win = ecore_x_window_input_new(e_comp->win,
-                                        e_comp->x, e_comp->y,
+                                        0, 0,
                                         e_comp->w, e_comp->h);
 
    ecore_x_window_show(_drag_win);
index b40eea8..31d5aad 100644 (file)
@@ -756,9 +756,8 @@ _cover_new(E_Zone *zone)
    evas_object_show(cov->text);
 
 #else
-   cov->win = ecore_x_window_input_new(e_compager->root,
-                                       e_comp->x + zone->x,
-                                       e_comp->y + zone->y,
+   cov->win = ecore_x_window_input_new(e_comp->root,
+                                       zone->x, zone->y,
                                        zone->w, zone->h);
 #endif