# SDL: video: Return the unsupported error for more unsupported operations

**URL:** <https://discourse.libsdl.org/t/sdl-video-return-the-unsupported-error-for-more-unsupported-operations/69437>\
**Category:** SDL Commits\
**Created:** [September 30, 2026, 3:37pm UTC](https://discourse.libsdl.org/t/sdl-video-return-the-unsupported-error-for-more-unsupported-operations/69437 "2026-09-30T15:37:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [September 30, 2026, 3:37pm UTC](https://discourse.libsdl.org/t/sdl-video-return-the-unsupported-error-for-more-unsupported-operations/69437/1 "2026-09-30T15:37:17Z")

</div>

> <https://github.com/libsdl-org/SDL/commit/199c044a5dc872f03f8e74cbb50deea008a0b67c>
>
> Toggling window borders, the resizable state, and always-on-top would always ret…urn success, even if the operations were unsupported by the backend, and these functions were no-ops.

```diff
From 199c044a5dc872f03f8e74cbb50deea008a0b67c Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Wed, 30 Sep 2026 11:04:18 -0400
Subject: [PATCH] video: Return the unsupported error for more unsupported
 operations

Toggling window borders, the resizable state, and always-on-top would always return success, even if the operations were unsupported by the backend, and these functions were no-ops.
---
 src/video/SDL_video.c | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 890d3637a0224..1960d5f2acf24 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -3146,9 +3146,13 @@ bool SDL_SetWindowBordered(SDL_Window *window, bool bordered)
     CHECK_WINDOW_MAGIC(window, false);
     CHECK_WINDOW_NOT_POPUP(window, false);
 
- const bool want = (bordered != false); // normalize the flag.
+ if (!_this->SetWindowBordered) {
+ return SDL_Unsupported();
+ }
+
+ const bool want = bordered;
     const bool have = !(window->flags & SDL_WINDOW_BORDERLESS);
- if ((want != have) && (_this->SetWindowBordered)) {
+ if (want != have) {
         if (want) {
             window->flags &= ~SDL_WINDOW_BORDERLESS;
         } else {
@@ -3165,9 +3169,13 @@ bool SDL_SetWindowResizable(SDL_Window *window, bool resizable)
     CHECK_WINDOW_MAGIC(window, false);
     CHECK_WINDOW_NOT_POPUP(window, false);
 
- const bool want = (resizable != false); // normalize the flag.
+ if (!_this->SetWindowResizable) {
+ return SDL_Unsupported();
+ }
+
+ const bool want = resizable;
     const bool have = ((window->flags & SDL_WINDOW_RESIZABLE) != 0);
- if ((want != have) && (_this->SetWindowResizable)) {
+ if (want != have) {
         if (want) {
             window->flags |= SDL_WINDOW_RESIZABLE;
         } else {
@@ -3185,9 +3193,13 @@ bool SDL_SetWindowAlwaysOnTop(SDL_Window *window, bool on_top)
     CHECK_WINDOW_MAGIC(window, false);
     CHECK_WINDOW_NOT_POPUP(window, false);
 
- const bool want = (on_top != false); // normalize the flag.
+ if (!_this->SetWindowAlwaysOnTop) {
+ return SDL_Unsupported();
+ }
+
+ const bool want = on_top;
     const bool have = ((window->flags & SDL_WINDOW_ALWAYS_ON_TOP) != 0);
- if ((want != have) && (_this->SetWindowAlwaysOnTop)) {
+ if (want != have) {
         if (want) {
             window->flags |= SDL_WINDOW_ALWAYS_ON_TOP;
         } else {

```
