antognolli pushed a commit to branch master.
commit 6890a0e4520d6d289fcb8a00e89aee435b4ac72c
Author: Rafael Antognolli <[email protected]>
Date: Wed Apr 24 19:32:49 2013 -0300
evas/wayland_shm: Fix resize to the left or top when rotated.
---
.../ecore_evas/engines/wayland/ecore_evas_wayland_shm.c | 10 +++++++---
src/modules/evas/engines/wayland_shm/evas_engine.c | 10 ++++++++--
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
index 3070697..31adbd7 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
@@ -526,15 +526,19 @@ _ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int
location)
Evas_Engine_Info_Wayland_Shm *einfo;
wdata->win->resizing = EINA_TRUE;
- if ((einfo = (Evas_Engine_Info_Wayland_Shm
*)evas_engine_info_get(ee->evas)))
- einfo->info.edges = wdata->win->edges;
+ if ((ee->rotation == 90) || (ee->rotation == 270))
+ evas_output_framespace_get(ee->evas, NULL, NULL, &fh, &fw);
+ else
+ evas_output_framespace_get(ee->evas, NULL, NULL, &fh, &fw);
- evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
+ if ((einfo = (Evas_Engine_Info_Wayland_Shm
*)evas_engine_info_get(ee->evas)))
if ((ee->rotation == 90) || (ee->rotation == 270))
ecore_wl_window_resize(wdata->win, ee->w + fh, ee->h + fw, location);
else
ecore_wl_window_resize(wdata->win, ee->w + fw, ee->h + fh, location);
+ einfo->info.edges = location;
+
}
}
#endif
diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.c
b/src/modules/evas/engines/wayland_shm/evas_engine.c
index 9974ca2..5bbc478 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.c
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.c
@@ -326,9 +326,15 @@ eng_output_resize(void *data, int w, int h)
if (!(info = re->info)) return;
if (info->info.edges & 4)
- dx = re->ob->w - w;
+ if ((info->info.rotation == 90) || (info->info.rotation == 270))
+ dx = re->ob->h - h;
+ else
+ dx = re->ob->w - w;
if (info->info.edges & 1)
- dy = re->ob->h - h;
+ if ((info->info.rotation == 90) || (info->info.rotation == 270))
+ dy = re->ob->w - w;
+ else
+ dy = re->ob->h - h;
re->outbuf_reconfigure(re->ob, dx, dy, w, h,
info->info.rotation, info->info.depth,
--
------------------------------------------------------------------------------
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