From 6ad5a966ea95918a4534ce22a7b31387db70675a Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 24 Nov 2025 19:06:13 -0800
Subject: [PATCH] Revert "Use DefWindowProc for the initial SDL window proc"
This reverts commit afeeef9cf5638d65ebea019f87c77a8c3977a8b5.
---
src/video/windows/SDL_windowsevents.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index bb45f122b16c3..559c1217185b9 100644
--- a/src/video/windows/SDL_windowsevents.c
+++ b/src/video/windows/SDL_windowsevents.c
@@ -2056,12 +2056,18 @@ int SDL_RegisterApp(const char *name, Uint32 style, void *hInst)
SDL_Instance = hInst ? hInst : GetModuleHandle(NULL);
/* Register the application class */
- SDL_zero(wcex);
wcex.cbSize = sizeof(WNDCLASSEX);
+ wcex.hCursor = NULL;
+ wcex.hIcon = NULL;
+ wcex.hIconSm = NULL;
+ wcex.lpszMenuName = NULL;
wcex.lpszClassName = SDL_Appname;
wcex.style = SDL_Appstyle;
- wcex.lpfnWndProc = DefWindowProc;
+ wcex.hbrBackground = NULL;
+ wcex.lpfnWndProc = WIN_WindowProc;
wcex.hInstance = SDL_Instance;
+ wcex.cbClsExtra = 0;
+ wcex.cbWndExtra = 0;
#if !defined(__XBOXONE__) && !defined(__XBOXSERIES__)
hint = SDL_GetHint(SDL_HINT_WINDOWS_INTRESOURCE_ICON);