Added the "SDL.window.wayland.registry" property

Fixes https://github.com/libsdl-org/SDL/issues/8393
This commit is contained in:
Sam Lantinga 2023-11-08 11:45:55 -08:00
parent 6c91b28e71
commit 151cdfa99f
2 changed files with 2 additions and 0 deletions

View File

@ -967,6 +967,7 @@ extern DECLSPEC SDL_Window *SDLCALL SDL_GetWindowParent(SDL_Window *window);
* "SDL.window.win32.instance" - the HINSTANCE associated with the window * "SDL.window.win32.instance" - the HINSTANCE associated with the window
* *
* On Wayland: * On Wayland:
* "SDL.window.wayland.registry" - the wl_registry associated with the window
* "SDL.window.wayland.display" - the wl_display associated with the window * "SDL.window.wayland.display" - the wl_display associated with the window
* "SDL.window.wayland.surface" - the wl_surface associated with the window * "SDL.window.wayland.surface" - the wl_surface associated with the window
* "SDL.window.wayland.egl_window" - the wl_egl_window associated with the window * "SDL.window.wayland.egl_window" - the wl_egl_window associated with the window

View File

@ -2098,6 +2098,7 @@ int Wayland_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window)
} /* All other cases will be WAYLAND_SURFACE_UNKNOWN */ } /* All other cases will be WAYLAND_SURFACE_UNKNOWN */
SDL_PropertiesID props = SDL_GetWindowProperties(window); SDL_PropertiesID props = SDL_GetWindowProperties(window);
SDL_SetProperty(props, "SDL.window.wayland.registry", c->registry);
SDL_SetProperty(props, "SDL.window.wayland.display", data->waylandData->display); SDL_SetProperty(props, "SDL.window.wayland.display", data->waylandData->display);
SDL_SetProperty(props, "SDL.window.wayland.surface", data->surface); SDL_SetProperty(props, "SDL.window.wayland.surface", data->surface);
SDL_SetProperty(props, "SDL.window.wayland.egl_window", data->egl_window); SDL_SetProperty(props, "SDL.window.wayland.egl_window", data->egl_window);