*/
#include "e.h"
+#ifdef HAVE_WAYLAND_ONLY
+#include <Ecore_Drm.h>
+#endif
+
#ifdef HAVE_EXECINFO_H
# include <execinfo.h>
#endif
static volatile Eina_Bool _e_x_composite_shutdown_try = 0;
+#ifndef HAVE_WAYLAND_ONLY
static void
_e_x_composite_shutdown(void)
{
-#ifndef HAVE_WAYLAND_ONLY
// Ecore_X_Display *dpy;
Ecore_X_Window root;
/* ignore errors, we really don't care at this point */
ecore_x_composite_unredirect_subwindows(root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
_e_x_composite_shutdown_try = 0;
-#endif
}
+#endif
#if 0
#define _e_write_safe(fd, buf) _e_write_safe_int(fd, buf, sizeof(buf))
EAPI void
e_sigseg_act(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__)
{
+#ifdef HAVE_WAYLAND_ONLY
+ Eina_List *list, *l, *ll;
+ Ecore_Drm_Device *dev;
+
+ list = ecore_drm_devices_get();
+ 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();
+#else
_e_x_composite_shutdown();
-#ifndef HAVE_WAYLAND_ONLY
ecore_x_pointer_ungrab();
ecore_x_keyboard_ungrab();
ecore_x_ungrab();
EAPI void
e_sigfpe_act(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__)
{
+#ifdef HAVE_WAYLAND_ONLY
+ Eina_List *list, *l, *ll;
+ Ecore_Drm_Device *dev;
+
+ list = ecore_drm_devices_get();
+ 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();
+#else
_e_x_composite_shutdown();
-#ifndef HAVE_WAYLAND_ONLY
ecore_x_pointer_ungrab();
ecore_x_keyboard_ungrab();
ecore_x_ungrab();
EAPI void
e_sigbus_act(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__)
{
+#ifdef HAVE_WAYLAND_ONLY
+ Eina_List *list, *l, *ll;
+ Ecore_Drm_Device *dev;
+
+ list = ecore_drm_devices_get();
+ 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();
+#else
_e_x_composite_shutdown();
-#ifndef HAVE_WAYLAND_ONLY
ecore_x_pointer_ungrab();
ecore_x_keyboard_ungrab();
ecore_x_ungrab();
EAPI void
e_sigabrt_act(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__)
{
+#ifdef HAVE_WAYLAND_ONLY
+ Eina_List *list, *l, *ll;
+ Ecore_Drm_Device *dev;
+
+ list = ecore_drm_devices_get();
+ 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();
+#else
_e_x_composite_shutdown();
-#ifndef HAVE_WAYLAND_ONLY
ecore_x_pointer_ungrab();
ecore_x_keyboard_ungrab();
ecore_x_ungrab();