mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-30 15:08:31 +00:00
wayland: Expose xdg_toplevel to SysWM
This commit is contained in:
@@ -140,6 +140,7 @@ void SDL_WAYLAND_UnloadSymbols(void);
|
||||
#define libdecor_frame_is_floating (*WAYLAND_libdecor_frame_is_floating)
|
||||
#define libdecor_frame_set_parent (*WAYLAND_libdecor_frame_set_parent)
|
||||
#define libdecor_frame_get_xdg_surface (*WAYLAND_libdecor_frame_get_xdg_surface)
|
||||
#define libdecor_frame_get_xdg_toplevel (*WAYLAND_libdecor_frame_get_xdg_toplevel)
|
||||
#define libdecor_frame_map (*WAYLAND_libdecor_frame_map)
|
||||
#define libdecor_state_new (*WAYLAND_libdecor_state_new)
|
||||
#define libdecor_state_free (*WAYLAND_libdecor_state_free)
|
||||
|
@@ -182,6 +182,7 @@ SDL_WAYLAND_SYM(bool, libdecor_frame_is_floating, (struct libdecor_frame *))
|
||||
SDL_WAYLAND_SYM(void, libdecor_frame_set_parent, (struct libdecor_frame *,\
|
||||
struct libdecor_frame *))
|
||||
SDL_WAYLAND_SYM(struct xdg_surface *, libdecor_frame_get_xdg_surface, (struct libdecor_frame *))
|
||||
SDL_WAYLAND_SYM(struct xdg_toplevel *, libdecor_frame_get_xdg_toplevel, (struct libdecor_frame *))
|
||||
SDL_WAYLAND_SYM(void, libdecor_frame_map, (struct libdecor_frame *))
|
||||
SDL_WAYLAND_SYM(struct libdecor_state *, libdecor_state_new, (int, int))
|
||||
SDL_WAYLAND_SYM(void, libdecor_state_free, (struct libdecor_state *))
|
||||
|
@@ -639,12 +639,19 @@ Wayland_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
|
||||
#ifdef HAVE_LIBDECOR_H
|
||||
if (viddata->shell.libdecor && data->shell_surface.libdecor.frame != NULL) {
|
||||
info->info.wl.xdg_surface = libdecor_frame_get_xdg_surface(data->shell_surface.libdecor.frame);
|
||||
if (version >= SDL_VERSIONNUM(2, 0, 17)) {
|
||||
info->info.wl.xdg_toplevel = libdecor_frame_get_xdg_toplevel(data->shell_surface.libdecor.frame);
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
if (viddata->shell.xdg && data->shell_surface.xdg.surface != NULL) {
|
||||
info->info.wl.xdg_surface = data->shell_surface.xdg.surface;
|
||||
if (version >= SDL_VERSIONNUM(2, 0, 17)) {
|
||||
info->info.wl.xdg_toplevel = data->shell_surface.xdg.roleobj.toplevel;
|
||||
}
|
||||
} else {
|
||||
info->info.wl.xdg_surface = NULL;
|
||||
info->info.wl.xdg_toplevel = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user