diff --git a/src/backend/wayland.c b/src/backend/wayland.c index 801c03f..148ca44 100644 --- a/src/backend/wayland.c +++ b/src/backend/wayland.c @@ -2575,7 +2575,6 @@ static int MwLLWaylandCallInitImpl(void) { /* * Order of precedence: * - MILSKO_BACKEND - * - XDG_SESSION_TYPE * - manually checking environment variables */ #ifdef __linux__ @@ -2583,11 +2582,7 @@ static int MwLLWaylandCallInitImpl(void) { if(getenv("MILSKO_BACKEND")) { loadWayland |= (strcmp(getenv("MILSKO_BACKEND"), "wayland") == 0); - } - if(getenv("XDG_SESSION_TYPE")) { - loadWayland |= (strcmp(getenv("XDG_SESSION_TYPE"), "wayland") == 0); - } - if(getenv("WAYLAND_DISPLAY")) { + } else if(getenv("WAYLAND_DISPLAY")) { loadWayland |= (getenv("WAYLAND_DISPLAY") != NULL); } diff --git a/src/backend/x11.c b/src/backend/x11.c index 755da71..4068186 100644 --- a/src/backend/x11.c +++ b/src/backend/x11.c @@ -1281,9 +1281,6 @@ static int MwLLX11CallInitImpl(void) { loadX11 |= (strcmp(getenv("MILSKO_BACKEND"), "x11") == 0); } - if(getenv("XDG_SESSION_TYPE")) { - loadX11 |= (strcmp(getenv("XDG_SESSION_TYPE"), "x11") == 0); - } if(getenv("DISPLAY")) { loadX11 |= (getenv("DISPLAY") != NULL); } diff --git a/src/core.c b/src/core.c index b4b6743..cdd0723 100644 --- a/src/core.c +++ b/src/core.c @@ -856,16 +856,16 @@ MwWidget MwGetParent(MwWidget handle) { typedef int (*call_t)(void); int MwLibraryInit(void) { call_t calls[] = { -/* x11 has higher priority then cocoa until it works */ +#ifdef USE_WAYLAND + MwLLWaylandCallInit, +#endif +/* x11 has higher priority then cocoa until it works */ #ifdef USE_X11 MwLLX11CallInit, #endif #ifdef USE_COCOA MwLLCocoaCallInit, #endif -#ifdef USE_WAYLAND - MwLLWaylandCallInit, -#endif #ifdef USE_GDI MwLLGDICallInit, #endif