Since surface handling is now done via modules, we need to ensure
the library can't be shutdown while a surface exists. Otherwise,
we get a segfault trying to call a function we've unmapped.
Fixes a bug on shutdown for some wayland clients using software
rendering.
surface->wl2_win = NULL;
free(surface);
+ /* We took a reference to ecore_wl2 in surface create to prevent
+ * modules unloading with surfaces in flight. Release that now.
+ */
+ ecore_wl2_shutdown();
}
EAPI void
ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_OFFSCREEN,
_ecore_wl2_surface_cb_offscreen,
out);
+ /* Since we have loadable modules, we need to make sure this
+ * surface keeps ecore_wl2 from de-initting and dlclose()ing
+ * things until after it's destroyed
+ */
+ ecore_wl2_init();
return out;
}
}