SDL: video: Rename 'state_not_floating' to the more descriptive 'tiled'

From b1061a3ec139e384f62c552a2d5e976b0aeeaf61 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Thu, 23 May 2024 10:26:36 -0400
Subject: [PATCH] video: Rename 'state_not_floating' to the more descriptive
 'tiled'

---
 src/events/SDL_windowevents.c         | 4 ++--
 src/video/SDL_sysvideo.h              | 6 +++---
 src/video/wayland/SDL_waylandwindow.c | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/events/SDL_windowevents.c b/src/events/SDL_windowevents.c
index 9a184bc8541f1..fb66714f93541 100644
--- a/src/events/SDL_windowevents.c
+++ b/src/events/SDL_windowevents.c
@@ -72,7 +72,7 @@ int SDL_SendWindowEvent(SDL_Window *window, SDL_EventType windowevent,
             window->windowed.x = data1;
             window->windowed.y = data2;
 
-            if (!(window->flags & SDL_WINDOW_MAXIMIZED) && !window->state_not_floating) {
+            if (!(window->flags & SDL_WINDOW_MAXIMIZED) && !window->tiled) {
                 window->floating.x = data1;
                 window->floating.y = data2;
             }
@@ -88,7 +88,7 @@ int SDL_SendWindowEvent(SDL_Window *window, SDL_EventType windowevent,
             window->windowed.w = data1;
             window->windowed.h = data2;
 
-            if (!(window->flags & SDL_WINDOW_MAXIMIZED) && !window->state_not_floating) {
+            if (!(window->flags & SDL_WINDOW_MAXIMIZED) && !window->tiled) {
                 window->floating.w = data1;
                 window->floating.h = data2;
             }
diff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h
index eb0f57c15bca4..bae1edf6d5508 100644
--- a/src/video/SDL_sysvideo.h
+++ b/src/video/SDL_sysvideo.h
@@ -70,10 +70,10 @@ struct SDL_Window
      */
     SDL_Rect floating;
 
-    /* Toggle for drivers to indicate that the current window state is
-     * not floating, but may not have any fixed-size flags (e.g. tiled)
+    /* Toggle for drivers to indicate that the current window state is tiled,
+     * and sizes set non-programmatically shouldn't be cached.
      */
-    SDL_bool state_not_floating;
+    SDL_bool tiled;
 
     /* Whether or not the initial position was defined */
     SDL_bool undefined_x;
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index c84cdd7c7945f..178efc1312f6b 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -859,7 +859,7 @@ static void handle_configure_xdg_toplevel(void *data,
     wind->floating = floating;
     wind->suspended = suspended;
     wind->active = active;
-    window->state_not_floating = tiled;
+    window->tiled = tiled;
 
     if (wind->surface_status == WAYLAND_SURFACE_STATUS_WAITING_FOR_CONFIGURE) {
         wind->surface_status = WAYLAND_SURFACE_STATUS_WAITING_FOR_FRAME;
@@ -1191,7 +1191,7 @@ static void decoration_frame_configure(struct libdecor_frame *frame,
     wind->floating = floating;
     wind->suspended = suspended;
     wind->active = active;
-    window->state_not_floating = tiled;
+    window->tiled = tiled;
 
     /* Calculate the new window geometry */
     ConfigureWindowGeometry(window);