discomfitor pushed a commit to branch enlightenment-0.21.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=73bc0bfc52a9d36f2ee3bb1a7609eacfb479e9ee

commit 73bc0bfc52a9d36f2ee3bb1a7609eacfb479e9ee
Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Mar 17 13:17:02 2017 -0400

    handle nested compositor delete requests
    
    the previous implementation of this using ee callbacks broke during
    elm integration since elm overrides all of those callbacks
---
 src/bin/e_comp.c                | 9 +++++++++
 src/modules/wl_wl/e_mod_main.c  | 7 -------
 src/modules/wl_x11/e_mod_main.c | 7 -------
 3 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c
index 3c1569a..6c374ff 100644
--- a/src/bin/e_comp.c
+++ b/src/bin/e_comp.c
@@ -1023,6 +1023,12 @@ _e_comp_resize(void *data EINA_UNUSED, Evas *e 
EINA_UNUSED, Evas_Object *obj, vo
    e_comp_canvas_update();
 }
 
+static void
+_e_comp_delete_request()
+{
+   e_sys_action_do(E_SYS_LOGOUT, NULL);
+}
+
 EINTERN Eina_Bool
 e_comp_init(void)
 {
@@ -1178,6 +1184,9 @@ out:
    e_comp->elm = elm_win_fake_add(e_comp->ee);
    evas_object_event_callback_add(e_comp->elm, EVAS_CALLBACK_RESIZE, 
_e_comp_resize, NULL);
    elm_win_fullscreen_set(e_comp->elm, 1);
+   elm_win_autodel_set(e_comp->elm, 1);
+   if (!e_comp->screen)
+     evas_object_smart_callback_add(e_comp->elm, "delete,request", 
_e_comp_delete_request, NULL);
    ecore_evas_focus_set(e_comp->ee, 0);
    ecore_evas_focus_set(e_comp->ee, 1);
    evas_object_show(e_comp->elm);
diff --git a/src/modules/wl_wl/e_mod_main.c b/src/modules/wl_wl/e_mod_main.c
index f385745..2172a96 100644
--- a/src/modules/wl_wl/e_mod_main.c
+++ b/src/modules/wl_wl/e_mod_main.c
@@ -2,12 +2,6 @@
 
 E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_Wl" };
 
-static void
-_cb_delete_request(Ecore_Evas *ee EINA_UNUSED)
-{
-   ecore_main_loop_quit();
-}
-
 static Eina_Bool
 _cb_sync_done(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
 {
@@ -59,7 +53,6 @@ e_modapi_init(E_Module *m)
      }
 
    ecore_evas_data_set(e_comp->ee, "comp", e_comp);
-   ecore_evas_callback_delete_request_set(e_comp->ee, _cb_delete_request);
    ecore_evas_title_set(e_comp->ee, "Enlightenment: WL-WL");
    ecore_evas_name_class_set(e_comp->ee, "E", "compositor");
 
diff --git a/src/modules/wl_x11/e_mod_main.c b/src/modules/wl_x11/e_mod_main.c
index d4caec8..e64f029 100644
--- a/src/modules/wl_x11/e_mod_main.c
+++ b/src/modules/wl_x11/e_mod_main.c
@@ -5,12 +5,6 @@ E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_X11" 
};
 
 static Ecore_Event_Handler *kbd_hdlr;
 
-static void
-_cb_delete_request(Ecore_Evas *ee EINA_UNUSED)
-{
-   ecore_main_loop_quit();
-}
-
 E_API void *
 e_modapi_init(E_Module *m)
 {
@@ -35,7 +29,6 @@ e_modapi_init(E_Module *m)
         ERR("Could not create ecore_evas canvas");
         return NULL;
      }
-   ecore_evas_callback_delete_request_set(e_comp->ee, _cb_delete_request);
    ecore_evas_title_set(e_comp->ee, "Enlightenment: WL-X11");
    ecore_evas_name_class_set(e_comp->ee, "E", "compositor");
 

-- 


Reply via email to