when e crashes in wayland, just crash instead of possibly freezing

This commit is contained in:
Mike Blumenkrantz 2015-07-09 15:11:13 -04:00
parent 399e3c79ce
commit 884068ff9d
1 changed files with 20 additions and 15 deletions

View File

@ -5,7 +5,7 @@
*/ */
#include "e.h" #include "e.h"
#ifdef HAVE_WAYLAND_ONLY #ifdef HAVE_WAYLAND
#include <Ecore_Drm.h> #include <Ecore_Drm.h>
#endif #endif
@ -66,22 +66,27 @@ _e_write_safe_int(int fd, const char *buf, size_t size)
static void static void
_e_crash(void) _e_crash(void)
{ {
#ifdef HAVE_WAYLAND_ONLY #ifdef HAVE_WAYLAND
const Eina_List *list, *l, *ll; if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
Ecore_Drm_Device *dev;
list = ecore_drm_devices_get();
EINA_LIST_FOREACH_SAFE(list, l, ll, dev)
{ {
ecore_drm_inputs_destroy(dev); const Eina_List *list, *l, *ll;
ecore_drm_sprites_destroy(dev); Ecore_Drm_Device *dev;
ecore_drm_device_close(dev);
ecore_drm_launcher_disconnect(dev);
ecore_drm_device_free(dev);
}
ecore_drm_shutdown(); list = ecore_drm_devices_get();
#else EINA_LIST_FOREACH_SAFE(list, l, ll, dev)
{
ecore_drm_inputs_destroy(dev);
ecore_drm_sprites_destroy(dev);
ecore_drm_device_close(dev);
ecore_drm_launcher_disconnect(dev);
ecore_drm_device_free(dev);
}
ecore_drm_shutdown();
return;
}
#endif
#ifndef HAVE_WAYLAND_ONLY
_e_x_composite_shutdown(); _e_x_composite_shutdown();
ecore_x_pointer_ungrab(); ecore_x_pointer_ungrab();
ecore_x_keyboard_ungrab(); ecore_x_keyboard_ungrab();