summaryrefslogtreecommitdiff
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-04 16:38:51 +0200
commita484ee1df37e34222f1aca90d4bddca51b417e14 (patch)
tree1fff89c1b6ea5feb299bdf170345064f9b5e2050
parent10b753bf7557b83c108536228d69b900ce360773 (diff)
xwayland: show the dialog after ecore_wl2 is in sync
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 @@
9EINTERN void dnd_init(void); 9EINTERN void dnd_init(void);
10EINTERN void dnd_shutdown(void); 10EINTERN void dnd_shutdown(void);
11 11
12static Ecore_Event_Handler *sync_handler;
12static E_Module *xwl_init(E_Module *m); 13static E_Module *xwl_init(E_Module *m);
13static void xwl_shutdown(void); 14static void xwl_shutdown(void);
14 15
@@ -337,9 +338,13 @@ setup_lock(void)
337} 338}
338 339
339static Eina_Bool 340static Eina_Bool
340error_dialog() 341_cb_sync_done(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
341{ 342{
342 e_util_dialog_internal(_("Error"), _("Cannot launch XWayland from X11 display.")); 343 e_util_dialog_internal(_("Error"), _("Cannot launch XWayland from X11 display."));
344
345 ecore_event_handler_del(sync_handler);
346 sync_handler = NULL;
347
343 return EINA_FALSE; 348 return EINA_FALSE;
344} 349}
345 350
@@ -353,7 +358,7 @@ xwl_init(E_Module *m)
353 358
354 if (getenv("DISPLAY")) 359 if (getenv("DISPLAY"))
355 { 360 {
356 ecore_timer_add(1.0, error_dialog, NULL); 361 sync_handler = ecore_event_handler_add(ECORE_WL2_EVENT_SYNC_DONE, _cb_sync_done, NULL);
357 return NULL; 362 return NULL;
358 } 363 }
359 364