diff --git a/Source/Engine/Platform/SDL/SDLInput.cpp b/Source/Engine/Platform/SDL/SDLInput.cpp index d73d28c47..a83689cac 100644 --- a/Source/Engine/Platform/SDL/SDLInput.cpp +++ b/Source/Engine/Platform/SDL/SDLInput.cpp @@ -4,11 +4,12 @@ #include "SDLInput.h" #include "SDLWindow.h" +#include "Engine/Core/Collections/Dictionary.h" +#include "Engine/Core/Log.h" #include "Engine/Input/Input.h" #include "Engine/Input/Mouse.h" #include "Engine/Input/Keyboard.h" #include "Engine/Input/Gamepad.h" -#include "Engine/Core/Collections/Dictionary.h" #include diff --git a/Source/Engine/Platform/SDL/SDLWindow.cpp b/Source/Engine/Platform/SDL/SDLWindow.cpp index 600705398..35f54f380 100644 --- a/Source/Engine/Platform/SDL/SDLWindow.cpp +++ b/Source/Engine/Platform/SDL/SDLWindow.cpp @@ -226,9 +226,9 @@ void* GetNativeWindowPointer(SDL_Window* window) #if PLATFORM_WINDOWS windowPtr = SDL_GetPointerProperty(props, SDL_PROP_WINDOW_WIN32_HWND_POINTER, nullptr); #elif PLATFORM_LINUX - windowPtr = GetWaylandSurfacePtr(); + windowPtr = SDL_GetPointerProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER, nullptr); if (windowPtr == nullptr) - windowPtr = (void*)GetX11WindowHandle(); + windowPtr = (void*)SDL_GetNumberProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_X11_WINDOW_NUMBER, 0); #elif PLATFORM_MAC windowPtr = SDL_GetPointerProperty(props, SDL_PROP_WINDOW_COCOA_WINDOW_POINTER, nullptr); #elif PLATFORM_ANDROID diff --git a/Source/Engine/Platform/SDL/SDLWindow.h b/Source/Engine/Platform/SDL/SDLWindow.h index 6641091be..dbf315c1b 100644 --- a/Source/Engine/Platform/SDL/SDLWindow.h +++ b/Source/Engine/Platform/SDL/SDLWindow.h @@ -8,6 +8,9 @@ struct SDL_Window; union SDL_Event; +#if PLATFORM_LINUX +class MessageBox; +#endif /// /// Implementation of the window class for SDL platform @@ -20,7 +23,7 @@ class FLAXENGINE_API SDLWindow : public WindowBase friend SDLPlatform; #if PLATFORM_LINUX friend LinuxPlatform; - friend class LinuxWindow; + friend MessageBox; #endif private: