Implement Wayland_SetWindowResizable
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
diff --git a/src/video/wayland/SDL_waylandvideo.c b/src/video/wayland/SDL_waylandvideo.c
index addd006..61034f4 100644
--- a/src/video/wayland/SDL_waylandvideo.c
+++ b/src/video/wayland/SDL_waylandvideo.c
@@ -203,6 +203,7 @@ Wayland_CreateDevice(int devindex)
device->SetWindowGrab = Wayland_SetWindowGrab;
device->RestoreWindow = Wayland_RestoreWindow;
device->SetWindowBordered = Wayland_SetWindowBordered;
+ device->SetWindowResizable = Wayland_SetWindowResizable;
device->SetWindowSize = Wayland_SetWindowSize;
device->SetWindowTitle = Wayland_SetWindowTitle;
device->DestroyWindow = Wayland_DestroyWindow;
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index 9f9cf6c..16c6fa6 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -628,6 +628,16 @@ Wayland_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
}
void
+Wayland_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable)
+{
+ /* No-op, this is handled by the xdg-shell/wl_shell callbacks.
+ * Also note that we do NOT implement SetMaximumSize/SetMinimumSize, as
+ * those are also no-ops for the same reason, but SDL_video.c does not
+ * require a driver implementation.
+ */
+}
+
+void
Wayland_MaximizeWindow(_THIS, SDL_Window * window)
{
SDL_WindowData *wind = window->driverdata;
diff --git a/src/video/wayland/SDL_waylandwindow.h b/src/video/wayland/SDL_waylandwindow.h
index 88a9768..4753cae 100644
--- a/src/video/wayland/SDL_waylandwindow.h
+++ b/src/video/wayland/SDL_waylandwindow.h
@@ -94,6 +94,7 @@ extern void Wayland_MinimizeWindow(_THIS, SDL_Window * window);
extern void Wayland_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
extern void Wayland_RestoreWindow(_THIS, SDL_Window * window);
extern void Wayland_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered);
+extern void Wayland_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable);
extern int Wayland_CreateWindow(_THIS, SDL_Window *window);
extern void Wayland_SetWindowSize(_THIS, SDL_Window * window);
extern void Wayland_SetWindowTitle(_THIS, SDL_Window * window);