diff --git a/external/parallel-rdp/ParallelRDPWrapper.cpp b/external/parallel-rdp/ParallelRDPWrapper.cpp index 60826006..af210e45 100644 --- a/external/parallel-rdp/ParallelRDPWrapper.cpp +++ b/external/parallel-rdp/ParallelRDPWrapper.cpp @@ -7,6 +7,7 @@ #include #include #include +#include using namespace Vulkan; using namespace RDP; @@ -36,6 +37,21 @@ void ParallelRDP::LoadWSIPlatform(const std::shared_ptr } windowInfo = newWindowInfo; + + auto props = SDL_CreateProperties(); +#ifdef SDL_PLATFORM_LINUX + SDL_SetPointerProperty(props, SDL_PROP_WINDOW_CREATE_WAYLAND_WL_SURFACE_POINTER, + dynamic_cast(wsi_platform.get())->window->winId()); + SDL_SetPointerProperty(props, SDL_PROP_WINDOW_X11_DISPLAY_POINTER, + dynamic_cast(wsi_platform.get())->window->winId()); +#elif SDL_PLATFORM_WINDOWS + SDL_SetPointerProperty(props, SDL_PROP_WINDOW_CREATE_WIN32_HWND_POINTER, + dynamic_cast(wsi_platform.get())->window->winId()); +#else + SDL_SetPointerProperty(props, SDL_PROP_WINDOW_CREATE_COCOA_WINDOW_POINTER, + dynamic_cast(wsi_platform.get())->window->winId()); +#endif + SDLWindow = SDL_CreateWindowWithProperties(props); } void ParallelRDP::Init(const std::shared_ptr &factory, diff --git a/external/parallel-rdp/ParallelRDPWrapper.hpp b/external/parallel-rdp/ParallelRDPWrapper.hpp index 5a31ebee..883afc4e 100644 --- a/external/parallel-rdp/ParallelRDPWrapper.hpp +++ b/external/parallel-rdp/ParallelRDPWrapper.hpp @@ -2,6 +2,7 @@ #include #include #include +#include class ParallelRDP { public: @@ -34,4 +35,5 @@ private: std::shared_ptr wsi; std::shared_ptr command_processor; std::shared_ptr windowInfo; + SDL_Window *SDLWindow; };