aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-08-03 19:03:44 +0200
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-08-03 19:42:06 +0200
commit9b1cc6a380fba32179466710771d15a060d7e7ad (patch)
tree6e0761b7318ede26c355271e1ecdcf8dedb92e3c
parente_dnd: move the ungrab to the object free (diff)
downloadenlightenment-devs/bu5hm4n/fixes.tar.gz
xwayland: show the dialog after ecore_wl2 is in syncdevs/bu5hm4n/fixes
otherwise ecore_wl2 could produce crashes.
-rw-r--r--src/modules/xwayland/e_mod_main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/xwayland/e_mod_main.c b/src/modules/xwayland/e_mod_main.c
index 3e5c895f0..b113e270d 100644
--- a/src/modules/xwayland/e_mod_main.c
+++ b/src/modules/xwayland/e_mod_main.c
@@ -9,6 +9,7 @@
EINTERN void dnd_init(void);
EINTERN void dnd_shutdown(void);
+static Ecore_Event_Handler *sync_handler;
static E_Module *xwl_init(E_Module *m);
static void xwl_shutdown(void);
@@ -337,9 +338,13 @@ setup_lock(void)
}
static Eina_Bool
-error_dialog()
+_cb_sync_done(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
{
e_util_dialog_internal(_("Error"), _("Cannot launch XWayland from X11 display."));
+
+ ecore_event_handler_del(sync_handler);
+ sync_handler = NULL;
+
return EINA_FALSE;
}
@@ -353,7 +358,7 @@ xwl_init(E_Module *m)
if (getenv("DISPLAY"))
{
- ecore_timer_add(1.0, error_dialog, NULL);
+ sync_handler = ecore_event_handler_add(ECORE_WL2_EVENT_SYNC_DONE, _cb_sync_done, NULL);
return NULL;
}