Skip to content

Commit 7204fc6

Browse files
committed
Fix flash of white at window edge while resizing on Windows.
1 parent 3878d31 commit 7204fc6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ While some features like the clipboard, menus or file dialogs are not yet availa
7575
- X11: Support individual window closing. ([#900] by [@xStrom])
7676
- X11: Support `Application::quit`. ([#900] by [@xStrom])
7777
- GTK: Support file filters in open/save dialogs. ([#903] by [@jneem])
78+
- Windows: Removed flashes of white background at the edge of the window when resizing. ([#915] by [@xStrom])
7879

7980
### Visual
8081

@@ -157,6 +158,7 @@ While some features like the clipboard, menus or file dialogs are not yet availa
157158
[#900]: https://github.com/xi-editor/druid/pull/900
158159
[#903]: https://github.com/xi-editor/druid/pull/903
159160
[#909]: https://github.com/xi-editor/druid/pull/909
161+
[#915]: https://github.com/xi-editor/druid/pull/915
160162

161163
## [0.5.0] - 2020-04-01
162164

druid-shell/src/platform/windows/application.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ use winapi::shared::windef::{HCURSOR, HWND};
2626
use winapi::shared::winerror::HRESULT_FROM_WIN32;
2727
use winapi::um::errhandlingapi::GetLastError;
2828
use winapi::um::shellscalingapi::PROCESS_SYSTEM_DPI_AWARE;
29-
use winapi::um::wingdi::CreateSolidBrush;
3029
use winapi::um::winuser::{
3130
DispatchMessageW, GetAncestor, GetMessageW, LoadIconW, PostMessageW, PostQuitMessage,
3231
RegisterClassW, TranslateAcceleratorW, TranslateMessage, GA_ROOT, IDI_APPLICATION, MSG,
@@ -74,7 +73,6 @@ impl Application {
7473
unsafe {
7574
let class_name = CLASS_NAME.to_wide();
7675
let icon = LoadIconW(0 as HINSTANCE, IDI_APPLICATION);
77-
let brush = CreateSolidBrush(0xff_ff_ff);
7876
let wnd = WNDCLASSW {
7977
style: 0,
8078
lpfnWndProc: Some(window::win_proc_dispatch),
@@ -83,7 +81,7 @@ impl Application {
8381
hInstance: 0 as HINSTANCE,
8482
hIcon: icon,
8583
hCursor: 0 as HCURSOR,
86-
hbrBackground: brush,
84+
hbrBackground: ptr::null_mut(), // We control all the painting
8785
lpszMenuName: 0 as LPCWSTR,
8886
lpszClassName: class_name.as_ptr(),
8987
};

0 commit comments

Comments
 (0)