|
68 | 68 | #include "color-management-v1-client-protocol.h" |
69 | 69 | #include "pointer-warp-v1-client-protocol.h" |
70 | 70 | #include "pointer-gestures-unstable-v1-client-protocol.h" |
| 71 | +#include "single-pixel-buffer-v1-client-protocol.h" |
71 | 72 |
|
72 | 73 | #ifdef HAVE_LIBDECOR_H |
73 | 74 | #include <libdecor.h> |
@@ -651,6 +652,7 @@ static SDL_VideoDevice *Wayland_CreateDevice(bool require_preferred_protocols) |
651 | 652 | device->SetWindowResizable = Wayland_SetWindowResizable; |
652 | 653 | device->SetWindowPosition = Wayland_SetWindowPosition; |
653 | 654 | device->SetWindowSize = Wayland_SetWindowSize; |
| 655 | + device->SetWindowAspectRatio = Wayland_SetWindowAspectRatio; |
654 | 656 | device->SetWindowMinimumSize = Wayland_SetWindowMinimumSize; |
655 | 657 | device->SetWindowMaximumSize = Wayland_SetWindowMaximumSize; |
656 | 658 | device->SetWindowParent = Wayland_SetWindowParent; |
@@ -1272,6 +1274,8 @@ static void handle_registry_global(void *data, struct wl_registry *registry, uin |
1272 | 1274 |
|
1273 | 1275 | if (SDL_strcmp(interface, "wl_compositor") == 0) { |
1274 | 1276 | d->compositor = wl_registry_bind(d->registry, id, &wl_compositor_interface, SDL_min(SDL_WL_COMPOSITOR_VERSION, version)); |
| 1277 | + } else if (SDL_strcmp(interface, "wl_subcompositor") == 0) { |
| 1278 | + d->subcompositor = wl_registry_bind(d->registry, id, &wl_subcompositor_interface, 1); |
1275 | 1279 | } else if (SDL_strcmp(interface, "wl_output") == 0) { |
1276 | 1280 | Wayland_add_display(d, id, SDL_min(version, SDL_WL_OUTPUT_VERSION)); |
1277 | 1281 | } else if (SDL_strcmp(interface, "wl_seat") == 0) { |
@@ -1337,6 +1341,8 @@ static void handle_registry_global(void *data, struct wl_registry *registry, uin |
1337 | 1341 | } else if (SDL_strcmp(interface, "zwp_pointer_gestures_v1") == 0) { |
1338 | 1342 | d->zwp_pointer_gestures = wl_registry_bind(d->registry, id, &zwp_pointer_gestures_v1_interface, SDL_min(version, 3)); |
1339 | 1343 | Wayland_DisplayInitPointerGestureManager(d); |
| 1344 | + } else if (SDL_strcmp(interface, "wp_single_pixel_buffer_manager_v1") == 0) { |
| 1345 | + d->single_pixel_buffer_manager = wl_registry_bind(d->registry, id, &wp_single_pixel_buffer_manager_v1_interface, 1); |
1340 | 1346 | } |
1341 | 1347 | #ifdef SDL_WL_FIXES_VERSION |
1342 | 1348 | else if (SDL_strcmp(interface, "wl_fixes") == 0) { |
@@ -1665,6 +1671,11 @@ static void Wayland_VideoCleanup(SDL_VideoDevice *_this) |
1665 | 1671 | data->zwp_pointer_gestures = NULL; |
1666 | 1672 | } |
1667 | 1673 |
|
| 1674 | + if (data->single_pixel_buffer_manager) { |
| 1675 | + wp_single_pixel_buffer_manager_v1_destroy(data->single_pixel_buffer_manager); |
| 1676 | + data->single_pixel_buffer_manager = NULL; |
| 1677 | + } |
| 1678 | + |
1668 | 1679 | if (data->compositor) { |
1669 | 1680 | wl_compositor_destroy(data->compositor); |
1670 | 1681 | data->compositor = NULL; |
|
0 commit comments