diff --git a/CHANGELOG.md b/CHANGELOG.md index ea246d45..39877a8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ And please only add new entries to the top of this list, right below the `# Unre # Unreleased +- On Windows, revert window background to an empty brush to avoid white flashes when changing scaling - **Breaking:** Removed `Window::set_always_on_top` and related APIs in favor of `Window::set_window_level`. - On Windows, MacOS and X11, add always on bottom APIs. - On Windows, fix the value in `MouseButton::Other`. diff --git a/src/platform_impl/windows/window.rs b/src/platform_impl/windows/window.rs index 1e258a60..9e86f21d 100644 --- a/src/platform_impl/windows/window.rs +++ b/src/platform_impl/windows/window.rs @@ -1067,7 +1067,6 @@ where unsafe fn register_window_class() -> Vec { let class_name = util::encode_wide("Window Class"); - use windows_sys::Win32::Graphics::Gdi::COLOR_WINDOWFRAME; let class = WNDCLASSEXW { cbSize: mem::size_of::() as u32, style: CS_HREDRAW | CS_VREDRAW, @@ -1077,7 +1076,7 @@ unsafe fn register_window_class() -> Vec { hInstance: util::get_instance_handle(), hIcon: 0, hCursor: 0, // must be null in order for cursor state to work properly - hbrBackground: COLOR_WINDOWFRAME as _, + hbrBackground: 0, lpszMenuName: ptr::null(), lpszClassName: class_name.as_ptr(), hIconSm: 0,