mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-02 07:58:30 +00:00
wayland: enable/disable ACTION_RESIZE for fullscreen
This commit is contained in:

committed by
Sam Lantinga

parent
9e6fcbe72c
commit
48066984b7
@@ -136,9 +136,17 @@ SetFullscreen(SDL_Window *window, struct wl_output *output)
|
||||
return; /* Can't do anything yet, wait for ShowWindow */
|
||||
}
|
||||
if (output) {
|
||||
if (!(window->flags & SDL_WINDOW_RESIZABLE)) {
|
||||
/* ensure that window is resizable before going into fullscreen */
|
||||
libdecor_frame_set_capabilities(wind->shell_surface.libdecor.frame, LIBDECOR_ACTION_RESIZE);
|
||||
}
|
||||
libdecor_frame_set_fullscreen(wind->shell_surface.libdecor.frame, output);
|
||||
} else {
|
||||
libdecor_frame_unset_fullscreen(wind->shell_surface.libdecor.frame);
|
||||
if (!(window->flags & SDL_WINDOW_RESIZABLE)) {
|
||||
/* restore previous RESIZE capability */
|
||||
libdecor_frame_unset_capabilities(wind->shell_surface.libdecor.frame, LIBDECOR_ACTION_RESIZE);
|
||||
}
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user