antognolli pushed a commit to branch master.
commit 5e507cf3d68e7fbf29037f247452b36c5f85a8d8
Author: Rafael Antognolli <[email protected]>
Date: Wed Feb 27 16:51:24 2013 -0300
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.
---
.../engines/wayland/ecore_evas_wayland_common.c | 26 ++++++++++++++++++++++
1 file changed, 26 insertions(+)
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 567ce2e..45a5e1f 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;
--
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb