diff options
author | AiraYumi <aira.youme@airanyumi.net> | 2024-10-17 01:44:31 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-16 19:44:31 +0300 |
commit | 43beabd0c7ef22e9c814124916c2f193624834e7 (patch) | |
tree | 58a2e5ec5008ea28c1e5e5e523904c7d966c551e /indra/llwindow | |
parent | e205685d6d2f84722839a11f448c1f0655f1a8e3 (diff) |
Remove dependency on libwayland-dev (#2865)
Diffstat (limited to 'indra/llwindow')
-rw-r--r-- | indra/llwindow/llsdl.cpp | 1 | ||||
-rw-r--r-- | indra/llwindow/llwindowsdl.cpp | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/indra/llwindow/llsdl.cpp b/indra/llwindow/llsdl.cpp index 6161bd2972..3f7992a1d7 100644 --- a/indra/llwindow/llsdl.cpp +++ b/indra/llwindow/llsdl.cpp @@ -56,6 +56,7 @@ void init_sdl() std::initializer_list<std::tuple< char const*, char const * > > hintList = { {SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR,"0"}, + {SDL_HINT_VIDEODRIVER,"wayland,x11"}, {SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH,"1"}, {SDL_HINT_IME_INTERNAL_EDITING,"1"} }; diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 9d736a9970..4793ab4fc7 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -147,7 +147,7 @@ struct wl_proxy* (*ll_wl_proxy_marshal_flags)(struct wl_proxy *proxy, uint32_t o bool loadWaylandClient() { - auto *pSO = dlopen( "libwayland-client.so", RTLD_NOW); + auto *pSO = dlopen( "libwayland-client.so.0", RTLD_NOW); if( !pSO ) return false; @@ -506,6 +506,7 @@ bool LLWindowSDL::createContext(int x, int y, int width, int height, int bits, b /* Save the information for later use */ if ( info.subsystem == SDL_SYSWM_X11 ) { + SDL_SetHint(SDL_HINT_VIDEODRIVER, "x11"); mX11Data.mDisplay = info.info.x11.display; mX11Data.mXWindowID = info.info.x11.window; mServerProtocol = X11; @@ -514,8 +515,12 @@ bool LLWindowSDL::createContext(int x, int y, int width, int height, int bits, b else if ( info.subsystem == SDL_SYSWM_WAYLAND ) { #ifdef LL_WAYLAND - if( !loadWaylandClient() ) + if( !loadWaylandClient() ) { + SDL_SetHint(SDL_HINT_VIDEODRIVER, "x11"); LL_ERRS() << "Failed to load wayland-client.so or grab required functions" << LL_ENDL; + } else { + SDL_SetHint(SDL_HINT_VIDEODRIVER, "wayland"); + } mWaylandData.mSurface = info.info.wl.surface; mServerProtocol = Wayland; |