wayland: ignore resize in fullscreen or maximised mode

This commit is contained in:
Christian Rauch 2021-06-21 01:25:25 +01:00 committed by Sam Lantinga
parent ee062c644a
commit ac904b8e95
3 changed files with 11 additions and 0 deletions

View File

@ -141,6 +141,7 @@ void SDL_WAYLAND_UnloadSymbols(void);
#define libdecor_frame_has_capability (*WAYLAND_libdecor_frame_has_capability) #define libdecor_frame_has_capability (*WAYLAND_libdecor_frame_has_capability)
#define libdecor_frame_set_visibility (*WAYLAND_libdecor_frame_set_visibility) #define libdecor_frame_set_visibility (*WAYLAND_libdecor_frame_set_visibility)
#define libdecor_frame_is_visible (*WAYLAND_libdecor_frame_is_visible) #define libdecor_frame_is_visible (*WAYLAND_libdecor_frame_is_visible)
#define libdecor_frame_is_floating (*WAYLAND_libdecor_frame_is_floating)
#define libdecor_frame_map (*WAYLAND_libdecor_frame_map) #define libdecor_frame_map (*WAYLAND_libdecor_frame_map)
#define libdecor_state_new (*WAYLAND_libdecor_state_new) #define libdecor_state_new (*WAYLAND_libdecor_state_new)
#define libdecor_state_free (*WAYLAND_libdecor_state_free) #define libdecor_state_free (*WAYLAND_libdecor_state_free)

View File

@ -180,6 +180,7 @@ SDL_WAYLAND_SYM(bool, libdecor_frame_has_capability, (struct libdecor_frame *, \
enum libdecor_capabilities)) enum libdecor_capabilities))
SDL_WAYLAND_SYM(void, libdecor_frame_set_visibility, (struct libdecor_frame *, bool)) SDL_WAYLAND_SYM(void, libdecor_frame_set_visibility, (struct libdecor_frame *, bool))
SDL_WAYLAND_SYM(bool, libdecor_frame_is_visible, (struct libdecor_frame *)) SDL_WAYLAND_SYM(bool, libdecor_frame_is_visible, (struct libdecor_frame *))
SDL_WAYLAND_SYM(bool, libdecor_frame_is_floating, (struct libdecor_frame *))
SDL_WAYLAND_SYM(void, libdecor_frame_map, (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(struct libdecor_state *, libdecor_state_new, (int, int))
SDL_WAYLAND_SYM(void, libdecor_state_free, (struct libdecor_state *)) SDL_WAYLAND_SYM(void, libdecor_state_free, (struct libdecor_state *))

View File

@ -1544,6 +1544,15 @@ void Wayland_SetWindowSize(_THIS, SDL_Window * window)
struct libdecor_state *state; struct libdecor_state *state;
#endif #endif
#ifdef HAVE_LIBDECOR_H
/* we must not resize the window while we have a static (non-floating) size */
if (data->shell.libdecor &&
wind->shell_surface.libdecor.frame &&
!libdecor_frame_is_floating(wind->shell_surface.libdecor.frame)) {
return;
}
#endif
wl_surface_set_buffer_scale(wind->surface, get_window_scale_factor(window)); wl_surface_set_buffer_scale(wind->surface, get_window_scale_factor(window));
if (wind->egl_window) { if (wind->egl_window) {