Ecore_Evas (wayland): Do not set the shell_surface_listeners until
authordevilhorns <devilhorns@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 13 Jan 2012 00:01:09 +0000 (00:01 +0000)
committerdevilhorns <devilhorns@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 13 Jan 2012 00:01:09 +0000 (00:01 +0000)
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

src/lib/ecore_evas/ecore_evas_wayland_egl.c
src/lib/ecore_evas/ecore_evas_wayland_shm.c

index cded2e6..783a597 100644 (file)
@@ -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);
 
index 057cd17..b9c2e82 100644 (file)
@@ -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();