forked from enlightenment/efl
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. SVN revision: 67161
This commit is contained in:
parent
1a34b86f34
commit
ce12a4481b
|
@ -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);
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue