fix: do not use xdisplay to read locale on wayland

fixes: #9717
This commit is contained in:
sithlord48 2026-05-10 17:21:05 -04:00 committed by Nick Bolton
parent 60ce6634a9
commit 54672a9f6b

View file

@ -8,6 +8,7 @@
#include "deskflow/unix/AppUtilUnix.h"
#include "base/Log.h"
#include "common/PlatformInfo.h"
#if WINAPI_XWINDOWS
#include "deskflow/unix/X11LayoutsParser.h"
@ -91,9 +92,13 @@ std::vector<std::string> AppUtilUnix::getKeyboardLayoutList()
return layoutLangCodes;
}
// TODO: read the layout for x and wayland via xkbcommon
std::string AppUtilUnix::getCurrentLanguageCode()
{
std::string result = "";
if (deskflow::platform::isWayland())
return result;
#if WINAPI_XWINDOWS
auto display = XOpenDisplay(nullptr);