From: devilhorns Date: Fri, 13 Jan 2012 00:01:09 +0000 (+0000) Subject: Ecore_Evas (wayland): Do not set the shell_surface_listeners until X-Git-Tag: 2.0_alpha~86^2~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=045131747df9cc14218f8f7c89702836e81efc9d;p=framework%2Fuifw%2Fecore.git Ecore_Evas (wayland): Do not set the shell_surface_listeners until After we have set the new surface for the evas engine. Reason being: The shell_surface_listener_configure event handles resizing the ecore_evas. If that gets called Before we have set the new engine surface, then bad crashes can happen. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@67161 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore_evas/ecore_evas_wayland_egl.c b/src/lib/ecore_evas/ecore_evas_wayland_egl.c index cded2e6..783a597 100644 --- a/src/lib/ecore_evas/ecore_evas_wayland_egl.c +++ b/src/lib/ecore_evas/ecore_evas_wayland_egl.c @@ -497,14 +497,14 @@ _ecore_evas_wl_show(Ecore_Evas *ee) ee->engine.wl.shell_surface = wl_shell_get_shell_surface(ecore_wl_shell_get(), ee->engine.wl.surface); - /* add listener for configure events (happen on shell surface resize) */ - wl_shell_surface_add_listener(ee->engine.wl.shell_surface, - &_ecore_evas_wl_shell_surface_listener, ee); - /* set the engine surface here. This should trigger an egl window create */ einfo->info.surface = ee->engine.wl.surface; evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); + /* add listener for configure events (happen on shell surface resize) */ + wl_shell_surface_add_listener(ee->engine.wl.shell_surface, + &_ecore_evas_wl_shell_surface_listener, ee); + /* Raise this surface to the top */ wl_shell_surface_set_toplevel(ee->engine.wl.shell_surface); diff --git a/src/lib/ecore_evas/ecore_evas_wayland_shm.c b/src/lib/ecore_evas/ecore_evas_wayland_shm.c index 057cd17..b9c2e82 100644 --- a/src/lib/ecore_evas/ecore_evas_wayland_shm.c +++ b/src/lib/ecore_evas/ecore_evas_wayland_shm.c @@ -549,10 +549,6 @@ _ecore_evas_wl_show(Ecore_Evas *ee) ee->engine.wl.shell_surface = wl_shell_get_shell_surface(ecore_wl_shell_get(), ee->engine.wl.surface); - /* add configure listener for wayland resize events */ - wl_shell_surface_add_listener(ee->engine.wl.shell_surface, - &_ecore_evas_wl_shell_surface_listener, ee); - /* set toplevel */ wl_shell_surface_set_toplevel(ee->engine.wl.shell_surface); @@ -568,6 +564,10 @@ _ecore_evas_wl_show(Ecore_Evas *ee) /* set new engine destination */ evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); + /* add configure listener for wayland resize events */ + wl_shell_surface_add_listener(ee->engine.wl.shell_surface, + &_ecore_evas_wl_shell_surface_listener, ee); + /* flush new buffer fd */ ecore_wl_flush();