aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Antognolli <rafael.antognolli@linux.intel.com>2013-02-27 16:51:24 -0300
committerRafael Antognolli <rafael.antognolli@linux.intel.com>2013-02-28 12:48:42 -0300
commit5e507cf3d68e7fbf29037f247452b36c5f85a8d8 (patch)
tree0bcbbc3ab3451ec5c1f8c4a24e7923b09026c14e
parent3d0bd026ba3dec800e5d5cc1332656d9b66c6cf2 (diff)
downloadefl-5e507cf3d68e7fbf29037f247452b36c5f85a8d8.tar.gz
efl-5e507cf3d68e7fbf29037f247452b36c5f85a8d8.tar.xz
efl-5e507cf3d68e7fbf29037f247452b36c5f85a8d8.zip
ecore_evas/wayland: Update window size when receiving compositor event.
This will force the window to correctly update its size when the event is received by the compositor, rather than just after an ecore_evas_resize(). It fixes the window resizing of non-elementary applications, since the elementary window already deals with such resize by calling ecore_evas_resize.
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index 567ce2eeb..45a5e1f39 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -115,6 +115,7 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
{
Ecore_Evas *ee;
Ecore_Wl_Event_Window_Configure *ev;
+ Ecore_Evas_Engine_Wl_Data *wdata;
int nw = 0, nh = 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -160,7 +161,32 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
{
ee->req.w = nw;
ee->req.h = nh;
+ ee->w = ev->w;
+ ee->h = ev->h;
if (ee->func.fn_resize) ee->func.fn_resize(ee);
+
+ if ((ee->rotation == 90) || (ee->rotation == 270))
+ {
+ evas_output_size_set(ee->evas, ev->h, ev->w);
+ evas_output_viewport_set(ee->evas, 0, 0, ev->h, ev->w);
+ }
+ else
+ {
+ evas_output_size_set(ee->evas, ev->w, ev->h);
+ evas_output_viewport_set(ee->evas, 0, 0, ev->w, ev->h);
+ }
+
+ wdata = ee->engine.data;
+
+ if (wdata->win)
+ {
+ Ecore_Wl_Window *win;
+
+ win = wdata->win;
+
+ win->server_allocation = win->allocation;
+ ecore_wl_window_update_size(wdata->win, ev->w, ev->h);
+ }
}
return ECORE_CALLBACK_PASS_ON;