aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Antognolli <rafael.antognolli@linux.intel.com>2013-02-27 19:12:58 -0300
committerRafael Antognolli <rafael.antognolli@linux.intel.com>2013-02-28 12:48:42 -0300
commite92bafb14147c81de4dc246c28114331276d7e25 (patch)
treefbb9f030b182fb8f023ee78a331978f80976a0ab
parent5e507cf3d68e7fbf29037f247452b36c5f85a8d8 (diff)
downloadefl-e92bafb14147c81de4dc246c28114331276d7e25.tar.gz
efl-e92bafb14147c81de4dc246c28114331276d7e25.tar.xz
efl-e92bafb14147c81de4dc246c28114331276d7e25.zip
ecore_evas/wayland: Call _ecore_evas_wayland_resize on window configure.
This will update the edges info inside the Evas_Engine_Info, and make it correctly resize to the top/left if needed. Also call ecore_wl_window_buffer_attach() on the egl engine, since it's needed after the ecore_wl_window_update_size().
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c6
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c1
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c4
3 files changed, 10 insertions, 1 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 45a5e1f39..6af06dbc0 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
@@ -24,8 +24,10 @@ static Evas_Smart *_ecore_evas_wl_common_smart = NULL;
static int _ecore_evas_wl_init_count = 0;
static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[5];
-/* Frame listener */
+static void _ecore_evas_wayland_resize(Ecore_Evas *ee, int location);
static void _ecore_evas_wl_frame_complete(void *data, struct wl_callback *callback, uint32_t tm);
+
+/* Frame listener */
static const struct wl_callback_listener frame_listener =
{
_ecore_evas_wl_frame_complete,
@@ -186,6 +188,8 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
win->server_allocation = win->allocation;
ecore_wl_window_update_size(wdata->win, ev->w, ev->h);
+
+ _ecore_evas_wayland_resize(ee, win->edges);
}
}
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 0b3abfae5..d2e7d995d 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
@@ -456,6 +456,7 @@ _ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location)
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
}
+ ecore_wl_window_buffer_attach(wdata->win, NULL, 0, 0);
wdata->win->resizing = EINA_TRUE;
evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
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 27e98656d..efa0d6632 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
@@ -481,8 +481,12 @@ _ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location)
if (wdata->win)
{
int fw, fh;
+ 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;
+
evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
ecore_wl_window_resize(wdata->win, ee->w + fw, ee->h + fh, location);
}