# SDL: X11: fix removing SDL\_WINDOW\_HIDDEN flags (thanks @zturtleman)

**URL:** <https://discourse.libsdl.org/t/sdl-x11-fix-removing-sdl-window-hidden-flags-thanks-zturtleman/41411>\
**Category:** SDL Commits\
**Created:** [December 28, 2022, 10:20pm UTC](https://discourse.libsdl.org/t/sdl-x11-fix-removing-sdl-window-hidden-flags-thanks-zturtleman/41411 "2022-12-28T22:20:02Z")\
**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:** [December 28, 2022, 10:20pm UTC](https://discourse.libsdl.org/t/sdl-x11-fix-removing-sdl-window-hidden-flags-thanks-zturtleman/41411/1 "2022-12-28T22:20:02Z")

</div>

> <https://github.com/libsdl-org/SDL/commit/71eb78e7900c1c3b4a80b1d5b43d748700cf18b7>

```diff
From 71eb78e7900c1c3b4a80b1d5b43d748700cf18b7 Mon Sep 17 00:00:00 2001
From: Sylvain <[EMAIL REDACTED]>
Date: Wed, 28 Dec 2022 23:18:00 +0100
Subject: [PATCH] X11: fix removing SDL_WINDOW_HIDDEN flags (thanks
 @zturtleman)

---
 src/video/x11/SDL_x11window.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c
index dc1dbb82a91c..1a65df8b7aba 100644
--- a/src/video/x11/SDL_x11window.c
+++ b/src/video/x11/SDL_x11window.c
@@ -306,7 +306,7 @@ static int SetupWindowData(_THIS, SDL_Window *window, Window w, BOOL created)
         window->w = attrib.width;
         window->h = attrib.height;
         if (attrib.map_state != IsUnmapped) {
- window->flags &= SDL_WINDOW_HIDDEN;
+ window->flags &= ~SDL_WINDOW_HIDDEN;
         } else {
             window->flags |= SDL_WINDOW_HIDDEN;
         }

```
