summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRafael Antognolli <rafael.antognolli@intel.com>2013-04-24 18:33:43 -0300
committerRafael Antognolli <rafael.antognolli@intel.com>2013-04-25 19:58:03 -0300
commit1ec6dd5fbc2968b6c06cca8a67b871da51222681 (patch)
tree6b397a6cc0037a99b9beec02498f778156fe6cae /src
parent455d8790b9d80430f5ea6a96dd213fbc3c03492f (diff)
evas/wayland_egl: Fix resize to the left or top when rotated.
Diffstat (limited to 'src')
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c11
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_engine.c27
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)
491 491
492 wdata->win->resizing = EINA_TRUE; 492 wdata->win->resizing = EINA_TRUE;
493 evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh); 493 evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
494 ecore_wl_window_resize(wdata->win, ee->w + fw, ee->h + fh, location); 494 if ((ee->rotation == 0) || (ee->rotation == 180))
495 {
496 ecore_wl_window_resize(wdata->win, ee->w + fw, ee->h + fh, location);
497 ecore_wl_window_update_size(wdata->win, ee->w + fw, ee->h + fh);
498 }
499 else
500 {
501 ecore_wl_window_resize(wdata->win, ee->w + fh, ee->h + fw, location);
502 ecore_wl_window_update_size(wdata->win, ee->w + fh, ee->h + fw);
503 }
495 } 504 }
496} 505}
497#endif 506#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)
881 881
882 if (re->win->win) 882 if (re->win->win)
883 { 883 {
884 int aw, ah, dx, dy; 884 int aw, ah, dx = 0, dy = 0;
885 885
886 wl_egl_window_get_attached_size(re->win->win, &aw, &ah); 886 if ((re->win->rot == 90) || (re->win->rot == 270))
887 wl_egl_window_get_attached_size(re->win->win, &ah, &aw);
888 else
889 wl_egl_window_get_attached_size(re->win->win, &aw, &ah);
887 890
888 if (re->info->info.edges & 4) // resize from left 891 if (re->info->info.edges & 4) // resize from left
889 dx = aw - w; 892 {
890 else 893 if ((re->win->rot == 90) || (re->win->rot == 270))
891 dx = 0; 894 dx = ah - h;
895 else
896 dx = aw - w;
897 }
892 if (re->info->info.edges & 1) // resize from top 898 if (re->info->info.edges & 1) // resize from top
893 dy = ah - h; 899 {
894 else 900 if ((re->win->rot == 90) || (re->win->rot == 270))
895 dy = 0; 901 dy = aw - w;
902 else
903 dy = ah - h;
904 }
896 905
897 if ((re->win->rot == 90) || (re->win->rot == 270)) 906 if ((re->win->rot == 90) || (re->win->rot == 270))
898 wl_egl_window_resize(re->win->win, h, w, dy, dx); 907 wl_egl_window_resize(re->win->win, h, w, dx, dy);
899 else 908 else
900 wl_egl_window_resize(re->win->win, w, h, dx, dy); 909 wl_egl_window_resize(re->win->win, w, h, dx, dy);
901 } 910 }