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

@ -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,