mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-19 04:28:58 +00:00
wayland: Attach EGL objects to custom and external surfaces during reconfiguration
They are required when using EGL with an external surface.
(cherry picked from commit 06795b00ad)
This commit is contained in:
parent
2dc9006711
commit
1de0c4e0f0
2 changed files with 3 additions and 6 deletions
|
|
@ -2662,11 +2662,6 @@ static bool SDL_ReconfigureWindowInternal(SDL_Window *window, SDL_WindowFlags fl
|
|||
return false;
|
||||
}
|
||||
|
||||
// Don't attempt to reconfigure external windows.
|
||||
if (window->flags & SDL_WINDOW_EXTERNAL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only attempt to reconfigure if the window has no existing graphics flags.
|
||||
if (window->flags & (SDL_WINDOW_OPENGL | SDL_WINDOW_METAL | SDL_WINDOW_VULKAN)) {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -2654,7 +2654,9 @@ bool Wayland_ReconfigureWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_W
|
|||
{
|
||||
SDL_WindowData *data = window->internal;
|
||||
|
||||
if (data->shell_surface_status == WAYLAND_SHELL_SURFACE_STATUS_SHOWN) {
|
||||
// Don't try to reconfigure mapped windows, unless they are custom or external.
|
||||
if (data->shell_surface_status == WAYLAND_SHELL_SURFACE_STATUS_SHOWN &&
|
||||
data->shell_surface_type != WAYLAND_SHELL_SURFACE_TYPE_CUSTOM) {
|
||||
// Window is already mapped; abort.
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue