mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-23 10:12:47 +08:00
wayland: Handle min/max sizes in fixed-size windows with viewports
Wayland is sometimes at-odds with clients that want to enforce an aspect ratio or min/max window size, as certain window states have dimensions that either must be obeyed (maximized), or will give terrible results if they aren't (tiled). Use a viewport and a masking subsurface to handle cases where surfaces are unable to match the exact window size. The changes made to accommodate this also catches some additional windowing related edge-cases, simplifies synchronization, and prevents commits before a buffer has been attached to the surface.
This commit is contained in:
@@ -61,6 +61,7 @@ struct SDL_VideoData
|
||||
struct libdecor *libdecor;
|
||||
#endif
|
||||
} shell;
|
||||
struct wl_subcompositor *subcompositor;
|
||||
struct zwp_relative_pointer_manager_v1 *relative_pointer_manager;
|
||||
struct zwp_pointer_constraints_v1 *pointer_constraints;
|
||||
struct wp_pointer_warp_v1 *wp_pointer_warp_v1;
|
||||
@@ -85,6 +86,7 @@ struct SDL_VideoData
|
||||
struct zwp_tablet_manager_v2 *tablet_manager;
|
||||
struct wl_fixes *wl_fixes;
|
||||
struct zwp_pointer_gestures_v1 *zwp_pointer_gestures;
|
||||
struct wp_single_pixel_buffer_manager_v1 *single_pixel_buffer_manager;
|
||||
|
||||
struct xkb_context *xkb_context;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user