oops prioritize wayland
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
IoI_xD 2026-04-13 11:28:54 -07:00
commit 0ab497ca88
3 changed files with 5 additions and 13 deletions

View file

@ -2575,7 +2575,6 @@ static int MwLLWaylandCallInitImpl(void) {
/* /*
* Order of precedence: * Order of precedence:
* - MILSKO_BACKEND * - MILSKO_BACKEND
* - XDG_SESSION_TYPE
* - manually checking environment variables * - manually checking environment variables
*/ */
#ifdef __linux__ #ifdef __linux__
@ -2583,11 +2582,7 @@ static int MwLLWaylandCallInitImpl(void) {
if(getenv("MILSKO_BACKEND")) { if(getenv("MILSKO_BACKEND")) {
loadWayland |= loadWayland |=
(strcmp(getenv("MILSKO_BACKEND"), "wayland") == 0); (strcmp(getenv("MILSKO_BACKEND"), "wayland") == 0);
} } else if(getenv("WAYLAND_DISPLAY")) {
if(getenv("XDG_SESSION_TYPE")) {
loadWayland |= (strcmp(getenv("XDG_SESSION_TYPE"), "wayland") == 0);
}
if(getenv("WAYLAND_DISPLAY")) {
loadWayland |= (getenv("WAYLAND_DISPLAY") != NULL); loadWayland |= (getenv("WAYLAND_DISPLAY") != NULL);
} }

View file

@ -1281,9 +1281,6 @@ static int MwLLX11CallInitImpl(void) {
loadX11 |= loadX11 |=
(strcmp(getenv("MILSKO_BACKEND"), "x11") == 0); (strcmp(getenv("MILSKO_BACKEND"), "x11") == 0);
} }
if(getenv("XDG_SESSION_TYPE")) {
loadX11 |= (strcmp(getenv("XDG_SESSION_TYPE"), "x11") == 0);
}
if(getenv("DISPLAY")) { if(getenv("DISPLAY")) {
loadX11 |= (getenv("DISPLAY") != NULL); loadX11 |= (getenv("DISPLAY") != NULL);
} }

View file

@ -856,16 +856,16 @@ MwWidget MwGetParent(MwWidget handle) {
typedef int (*call_t)(void); typedef int (*call_t)(void);
int MwLibraryInit(void) { int MwLibraryInit(void) {
call_t calls[] = { 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 #ifdef USE_X11
MwLLX11CallInit, MwLLX11CallInit,
#endif #endif
#ifdef USE_COCOA #ifdef USE_COCOA
MwLLCocoaCallInit, MwLLCocoaCallInit,
#endif #endif
#ifdef USE_WAYLAND
MwLLWaylandCallInit,
#endif
#ifdef USE_GDI #ifdef USE_GDI
MwLLGDICallInit, MwLLGDICallInit,
#endif #endif