Fix various issues with child window positioning

This commit is contained in:
2024-12-25 19:45:10 +02:00
committed by Ari Vuollet
parent fbdbf1bdec
commit 297cd2c7af
7 changed files with 193 additions and 181 deletions

View File

@@ -30,6 +30,7 @@ Delegate<void*> LinuxPlatform::xEventReceived;
namespace
{
bool UseWayland = false;
bool UseXWayland = false;
X11::Display* xDisplay = nullptr;
X11::XIM IM = nullptr;
X11::XIC IC = nullptr;
@@ -847,7 +848,12 @@ bool SDLPlatform::InitPlatform()
return true;
if (!CommandLine::Options.Headless)
{
UseWayland = strcmp(SDL_GetCurrentVideoDriver(), "wayland") == 0;
String waylandDisplay;
if (/*!UseWayland &&*/ !Platform::GetEnvironmentVariable(TEXT("WAYLAND_DISPLAY"), waylandDisplay))
UseXWayland = waylandDisplay.Length() > 1;
}
return false;
}
@@ -920,7 +926,7 @@ bool SDLPlatform::UsesWayland()
bool SDLPlatform::UsesXWayland()
{
return false;
return UseXWayland;
}
bool SDLPlatform::UsesX11()