From 8f1ce47a3d6f38b60ecf0fd219daa4ae09725c75 Mon Sep 17 00:00:00 2001 From: Alex Charlton Date: Fri, 9 Oct 2026 21:29:49 -0700 Subject: [PATCH] Windows fix: Set window title on WM_NCCREATE --- src/wrappers/win32/window/proc.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wrappers/win32/window/proc.rs b/src/wrappers/win32/window/proc.rs index 70265f5e..ab2e0365 100644 --- a/src/wrappers/win32/window/proc.rs +++ b/src/wrappers/win32/window/proc.rs @@ -43,7 +43,12 @@ pub unsafe extern "system" fn wnd_proc( inner.initialize(window) }; - (handle_error_as_fatal(result, window, inner_ptr) == 0) as _ + match handle_error_as_fatal(result, window, inner_ptr) { + // On success, DefWindowProc sets up the non-client area, which includes the title + 0 => handle_default(), + // On failure, abort with false + _ => 0, + } } WM_CREATE => { let create = unsafe { &*(l_param as *const CREATESTRUCTW) };