mirror of
https://github.com/encounter/SDL.git
synced 2025-05-25 00:31:33 +00:00
wayland: Don't create a new libdecor context if one already exists
This commit is contained in:
parent
6f88cbe4c9
commit
6222bd3143
@ -908,6 +908,9 @@ SDL_bool
|
|||||||
Wayland_LoadLibdecor(SDL_VideoData *data, SDL_bool ignore_xdg)
|
Wayland_LoadLibdecor(SDL_VideoData *data, SDL_bool ignore_xdg)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LIBDECOR_H
|
#ifdef HAVE_LIBDECOR_H
|
||||||
|
if (data->shell.libdecor != NULL) {
|
||||||
|
return SDL_TRUE; /* Already loaded! */
|
||||||
|
}
|
||||||
if (should_use_libdecor(data, ignore_xdg)) {
|
if (should_use_libdecor(data, ignore_xdg)) {
|
||||||
data->shell.libdecor = libdecor_new(data->display, &libdecor_interface);
|
data->shell.libdecor = libdecor_new(data->display, &libdecor_interface);
|
||||||
return data->shell.libdecor != NULL;
|
return data->shell.libdecor != NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user