mirror of https://github.com/encounter/SDL.git
wayland: Fix GetWindowWMInfo for <2.0.15
This commit is contained in:
parent
585c11c5ae
commit
c20ab7dae9
|
@ -562,11 +562,10 @@ Wayland_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
|
||||||
|
|
||||||
info->info.wl.display = data->waylandData->display;
|
info->info.wl.display = data->waylandData->display;
|
||||||
info->info.wl.surface = data->surface;
|
info->info.wl.surface = data->surface;
|
||||||
|
|
||||||
if (version >= SDL_VERSIONNUM(2, 0, 15)) {
|
if (version >= SDL_VERSIONNUM(2, 0, 15)) {
|
||||||
info->info.wl.egl_window = data->egl_window;
|
info->info.wl.egl_window = data->egl_window;
|
||||||
}
|
|
||||||
|
|
||||||
info->info.wl.shell_surface = NULL;
|
|
||||||
#ifdef HAVE_LIBDECOR_H
|
#ifdef HAVE_LIBDECOR_H
|
||||||
if (viddata->shell.libdecor && data->shell_surface.libdecor.frame != NULL) {
|
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);
|
info->info.wl.xdg_surface = libdecor_frame_get_xdg_surface(data->shell_surface.libdecor.frame);
|
||||||
|
@ -577,7 +576,10 @@ Wayland_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
|
||||||
} else {
|
} else {
|
||||||
info->info.wl.xdg_surface = NULL;
|
info->info.wl.xdg_surface = NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Deprecated in 2.0.16 */
|
||||||
|
info->info.wl.shell_surface = NULL;
|
||||||
|
|
||||||
info->subsystem = SDL_SYSWM_WAYLAND;
|
info->subsystem = SDL_SYSWM_WAYLAND;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue