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().
This commit is contained in:
Rafael Antognolli 2013-02-27 19:12:58 -03:00
parent 5e507cf3d6
commit e92bafb141
3 changed files with 10 additions and 1 deletions

View File

@ -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);
}
}

View File

@ -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);

View File

@ -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);
}