antognolli pushed a commit to branch master.

commit 1ec6dd5fbc2968b6c06cca8a67b871da51222681
Author: Rafael Antognolli <[email protected]>
Date:   Wed Apr 24 18:33:43 2013 -0300

    evas/wayland_egl: Fix resize to the left or top when rotated.
---
 .../engines/wayland/ecore_evas_wayland_egl.c       | 11 ++++++++-
 src/modules/evas/engines/wayland_egl/evas_engine.c | 27 ++++++++++++++--------
 2 files changed, 28 insertions(+), 10 deletions(-)

diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
index fb8d19a..9c45bf7 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
@@ -491,7 +491,16 @@ _ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int 
location)
 
         wdata->win->resizing = EINA_TRUE;
         evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
-        ecore_wl_window_resize(wdata->win, ee->w + fw, ee->h + fh, location);
+        if ((ee->rotation == 0) || (ee->rotation == 180))
+          {
+             ecore_wl_window_resize(wdata->win, ee->w + fw, ee->h + fh, 
location);
+             ecore_wl_window_update_size(wdata->win, ee->w + fw, ee->h + fh);
+          }
+        else
+          {
+             ecore_wl_window_resize(wdata->win, ee->w + fh, ee->h + fw, 
location);
+             ecore_wl_window_update_size(wdata->win, ee->w + fh, ee->h + fw);
+          }
      }
 }
 #endif
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c 
b/src/modules/evas/engines/wayland_egl/evas_engine.c
index 56cac55..5f6b31d 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -881,21 +881,30 @@ eng_output_resize(void *data, int w, int h)
 
    if (re->win->win)
      {
-        int aw, ah, dx, dy;
+        int aw, ah, dx = 0, dy = 0;
 
-        wl_egl_window_get_attached_size(re->win->win, &aw, &ah);
+        if ((re->win->rot == 90) || (re->win->rot == 270))
+          wl_egl_window_get_attached_size(re->win->win, &ah, &aw);
+        else
+          wl_egl_window_get_attached_size(re->win->win, &aw, &ah);
 
         if (re->info->info.edges & 4) // resize from left
-          dx = aw - w;
-        else
-          dx = 0;
+          {
+             if ((re->win->rot == 90) || (re->win->rot == 270))
+               dx = ah - h;
+             else
+               dx = aw - w;
+          }
         if (re->info->info.edges & 1) // resize from top
-          dy = ah - h;
-        else
-          dy = 0;
+          {
+             if ((re->win->rot == 90) || (re->win->rot == 270))
+               dy = aw - w;
+             else
+               dy = ah - h;
+          }
 
         if ((re->win->rot == 90) || (re->win->rot == 270))
-          wl_egl_window_resize(re->win->win, h, w, dy, dx);
+          wl_egl_window_resize(re->win->win, h, w, dx, dy);
         else
           wl_egl_window_resize(re->win->win, w, h, dx, dy);
      }

-- 

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr

Reply via email to