Skip to content

Commit 9a03b0b

Browse files
committed
Fix flash of white at window edge while resizing on Windows.
1 parent e024f60 commit 9a03b0b

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
@@ -101,6 +101,7 @@ This means that druid no longer requires cairo on macOS and uses Core Graphics i
101101
- X11: Support `Application::quit`. ([#900] by [@xStrom])
102102
- GTK: Support file filters in open/save dialogs. ([#903] by [@jneem])
103103
- GTK: Support DPI values other than 96. ([#904] by [@xStrom])
104+
- Windows: Removed flashes of white background at the edge of the window when resizing. ([#915] by [@xStrom])
104105
- X11: Support key and mouse button state. ([#920] by [@jneem])
105106
- Routing `LifeCycle::FocusChanged` to descendant widgets. ([#925] by [@yrns])
106107
- Built-in open and save menu items now show the correct label and submit the right commands. ([#930] by [@finnerale])
@@ -199,6 +200,7 @@ This means that druid no longer requires cairo on macOS and uses Core Graphics i
199200
[#904]: https://github.com/xi-editor/druid/pull/904
200201
[#905]: https://github.com/xi-editor/druid/pull/905
201202
[#909]: https://github.com/xi-editor/druid/pull/909
203+
[#915]: https://github.com/xi-editor/druid/pull/915
202204
[#917]: https://github.com/xi-editor/druid/pull/917
203205
[#920]: https://github.com/xi-editor/druid/pull/920
204206
[#924]: https://github.com/xi-editor/druid/pull/924

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)