On Windows, revert window background to an empty brush to avoid white flashes when changing scaling (#2571)

This commit is contained in:
Fotis Gimian 2022-11-28 08:28:14 +11:00 committed by GitHub
parent 1786c877ec
commit 9ae7498a8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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`.

View file

@ -1067,7 +1067,6 @@ where
unsafe fn register_window_class<T: 'static>() -> Vec<u16> {
let class_name = util::encode_wide("Window Class");
use windows_sys::Win32::Graphics::Gdi::COLOR_WINDOWFRAME;
let class = WNDCLASSEXW {
cbSize: mem::size_of::<WNDCLASSEXW>() as u32,
style: CS_HREDRAW | CS_VREDRAW,
@ -1077,7 +1076,7 @@ unsafe fn register_window_class<T: 'static>() -> Vec<u16> {
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,