diff --git a/src/video/x11/SDL_x11video.c b/src/video/x11/SDL_x11video.c
index 61a014496324b596426992232c10e1e6938ede3f..7fde77eb42a973522676b372df8db120df5da02f 100644
--- a/src/video/x11/SDL_x11video.c
+++ b/src/video/x11/SDL_x11video.c
@@ -1203,6 +1203,9 @@ SDL_Surface *X11_SetVideoMode(_THIS, SDL_Surface *current,
 		current->pitch = SDL_CalculatePitch(current);
 		X11_ResizeImage(this, current, flags);
 	}
+
+	/* Clear these flags and set them only if they are in the new set. */
+	current->flags &= ~(SDL_RESIZABLE|SDL_NOFRAME);
 	current->flags |= (flags&(SDL_RESIZABLE|SDL_NOFRAME));
 
   done: