_wip parent-child positioning fixes

This commit is contained in:
2024-08-08 23:44:29 +03:00
parent b0aed96d18
commit b79c9402fd
6 changed files with 255 additions and 52 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()