From 8e604a5f12b23a8473c0d08a35d55964867035f5 Mon Sep 17 00:00:00 2001 From: Mathieu Eyraud <70028899+meyraud705@users.noreply.github.com> Date: Sun, 25 Jul 2021 18:44:33 +0200 Subject: [PATCH] Fix error handling in X11_SetWindowTitle X11_XChangeProperty return 1 on success. --- 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 4ce299f03..df34096f2 100644 --- a/src/video/x11/SDL_x11window.c +++ b/src/video/x11/SDL_x11window.c @@ -734,7 +734,7 @@ X11_SetWindowTitle(_THIS, SDL_Window * window) status = X11_XChangeProperty(display, data->xwindow, _NET_WM_NAME, UTF8_STRING, 8, 0, (const unsigned char *) title, strlen(title)); - if (status != Success) { + if (status != 1) { char *x11_error = NULL; char x11_error_locale[256]; if (X11_XGetErrorText(display, status, x11_error_locale, sizeof(x11_error_locale)) == Success)