SDL: wayland: More inset cleanups

From dff05080165c2fa026341e62634ddff6de8ac2d9 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Thu, 24 Sep 2026 14:10:59 -0400
Subject: [PATCH] wayland: More inset cleanups

Re-enable insets in display scaling mode, as it is clear that the insets are always in scaled points when doing so. Additionally, note that compositors may ignore min/max size hints or the non-resizable state on windows, and when insets are used, clients are responsible for handling this, as SDL can't mask around the main surface or use viewports to correct for this behavior.
---
 docs/README-wayland.md                | 10 ++++++----
 src/video/wayland/SDL_waylandwindow.c |  4 +---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/docs/README-wayland.md b/docs/README-wayland.md
index 3090eaa4064ae..b054439baf96d 100644
--- a/docs/README-wayland.md
+++ b/docs/README-wayland.md
@@ -29,10 +29,12 @@ encounter limitations or behavior that is different from other windowing systems
   `SDL_PROP_WINDOW_CREATE_WAYLAND_ENABLE_INSETS_BOOLEAN` property set to `true`. SDL then sets the xdg window geometry
   to the surface minus the insets (in points, regardless of pixel density) and translates configure sizes and size
   limits accordingly. Maximized and fullscreen windows are always sized exactly as configured, while tiled windows keep
-  their insets.  Changes take effect on the next configure. Only xdg-toplevel windows are affected; popup and
-  custom-role surfaces ignore the properties, as does libdecor, which manages the window geometry itself (see 
-  `SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR`). Insets are also incompatible with display scaling mode, and will be
-  automatically disabled when `SDL_HINT_VIDEO_WAYLAND_SCALE_TO_DISPLAY` is enabled.
+  their insets. Changes take effect on the next configure. Only xdg-toplevel windows are affected; popup and custom-role
+  surfaces ignore the properties, as does libdecor, which manages the window geometry itself (see 
+  `SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR`). Note that in certain cases, compositors may ignore the min and max size
+  hints, as well as the non-resizable state on windows. When this occurs and insets are enabled, SDL can't mask around
+  the main surface or use scaled viewports to compensate, so clients are responsible for handling this behavior
+  themselves.
   
 
 ### Windows do not appear immediately after creation
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index 31559decddc49..9143c78a51f22 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -3168,9 +3168,7 @@ bool Wayland_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_Proper
     }
 
     window->internal = data;
-    if (!c->scale_to_display_enabled) {
-        data->enable_insets = SDL_GetBooleanProperty(create_props, SDL_PROP_WINDOW_CREATE_WAYLAND_ENABLE_INSETS_BOOLEAN, false);
-    }
+    data->enable_insets = SDL_GetBooleanProperty(create_props, SDL_PROP_WINDOW_CREATE_WAYLAND_ENABLE_INSETS_BOOLEAN, false);
 
     if (window->x == SDL_WINDOWPOS_UNDEFINED) {
         window->x = 0;