From 5de0bcc9907a376899c305238bb65a0c07f0ed13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8?= Date: Fri, 13 Dec 2024 06:58:30 +0800 Subject: [PATCH] gpui: Fix for setting window titles on Windows (#21907) Windows requires `WM_NCCREATE` to be processed by default procedure to set window title properly. Release Notes: - N/A --- crates/gpui/src/platform/windows/window.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/gpui/src/platform/windows/window.rs b/crates/gpui/src/platform/windows/window.rs index a920461d40..16e2a3e7ac 100644 --- a/crates/gpui/src/platform/windows/window.rs +++ b/crates/gpui/src/platform/windows/window.rs @@ -1068,7 +1068,7 @@ unsafe extern "system" fn wnd_proc( let weak = Box::new(Rc::downgrade(creation_result.as_ref().unwrap())); unsafe { set_window_long(hwnd, GWLP_USERDATA, Box::into_raw(weak) as isize) }; ctx.inner = Some(creation_result); - return LRESULT(1); + return unsafe { DefWindowProcW(hwnd, msg, wparam, lparam) }; } let ptr = unsafe { get_window_long(hwnd, GWLP_USERDATA) } as *mut Weak; if ptr.is_null() {