Ecore_Evas: No need to call ecore_x_window_move/resize is the canvas
authordevilhorns <devilhorns@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 21 Sep 2011 20:55:12 +0000 (20:55 +0000)
committerdevilhorns <devilhorns@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 21 Sep 2011 20:55:12 +0000 (20:55 +0000)
is already at the required size or position.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@63522 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_evas/ecore_evas_x.c

index 7f94b05..b8c32cf 100644 (file)
@@ -1295,18 +1295,21 @@ _ecore_evas_x_move(Ecore_Evas *ee, int x, int y)
      }
    else
      {
-        ecore_x_window_move(ee->prop.window, x, y);
+        if ((ee->x != x) || (ee->y != y)) 
+          {
+             if (!ee->engine.x.managed)
+               {
+                  ee->x = x;
+                  ee->y = y;
+               }
+             ecore_x_window_move(ee->prop.window, x, y);
+          }
         if (!ee->should_be_visible)
           {
              /* We need to request pos */
              ee->prop.request_pos = 1;
              _ecore_evas_x_size_pos_hints_update(ee);
           }
-        if (!ee->engine.x.managed)
-          {
-             ee->x = x;
-             ee->y = y;
-          }
      }
 }
 
@@ -1362,7 +1365,7 @@ _ecore_evas_x_resize(Ecore_Evas *ee, int w, int h)
              if (ee->func.fn_resize) ee->func.fn_resize(ee);
           }
      }
-   else
+   else if ((ee->w != w) || (ee->h != h))
      ecore_x_window_resize(ee->prop.window, w, h);
 }