From b80f96f2fa08d1a875b95d41a0dffd9b1feb3391 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 2 Jul 2015 14:26:40 -0400 Subject: [PATCH] pop an error dialog when trying to load xwayland module under x11 this is impossible and will never be possible; ecore-x can only manage a single x11 connection at any time, and so it will never be possible to both manage the x11 compositor canvas on one xserver and manage xwayland clients on a separate server invalidates T2537 --- src/modules/xwayland/e_mod_main.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/modules/xwayland/e_mod_main.c b/src/modules/xwayland/e_mod_main.c index c5b982d..5b6a42f 100644 --- a/src/modules/xwayland/e_mod_main.c +++ b/src/modules/xwayland/e_mod_main.c @@ -288,6 +288,13 @@ setup_lock(void) return EINA_FALSE; } +static Eina_Bool +error_dialog() +{ + e_util_dialog_internal(_("Error"), _("Cannot launch XWayland from X11 display.")); + return EINA_FALSE; +} + /* module functions */ E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "XWayland" }; @@ -299,6 +306,12 @@ e_modapi_init(E_Module *m) /* make sure it's a wayland compositor */ if (e_comp->comp_type != E_PIXMAP_TYPE_WL) return NULL; + if (getenv("DISPLAY")) + { + ecore_timer_add(1.0, error_dialog, NULL); + return NULL; + } + DBG("LOAD XWAYLAND MODULE"); /* alloc space for server struct */ -- 2.7.4