Fix early dispatch crash on windows (#36445)
Closes #36384 Release Notes: - N/A
This commit is contained in:
parent
c5991e74bb
commit
97f784dedf
1 changed files with 8 additions and 0 deletions
|
@ -100,6 +100,7 @@ impl WindowsWindowInner {
|
||||||
WM_SETCURSOR => self.handle_set_cursor(handle, lparam),
|
WM_SETCURSOR => self.handle_set_cursor(handle, lparam),
|
||||||
WM_SETTINGCHANGE => self.handle_system_settings_changed(handle, wparam, lparam),
|
WM_SETTINGCHANGE => self.handle_system_settings_changed(handle, wparam, lparam),
|
||||||
WM_INPUTLANGCHANGE => self.handle_input_language_changed(lparam),
|
WM_INPUTLANGCHANGE => self.handle_input_language_changed(lparam),
|
||||||
|
WM_SHOWWINDOW => self.handle_window_visibility_changed(handle, wparam),
|
||||||
WM_GPUI_CURSOR_STYLE_CHANGED => self.handle_cursor_changed(lparam),
|
WM_GPUI_CURSOR_STYLE_CHANGED => self.handle_cursor_changed(lparam),
|
||||||
WM_GPUI_FORCE_UPDATE_WINDOW => self.draw_window(handle, true),
|
WM_GPUI_FORCE_UPDATE_WINDOW => self.draw_window(handle, true),
|
||||||
_ => None,
|
_ => None,
|
||||||
|
@ -1160,6 +1161,13 @@ impl WindowsWindowInner {
|
||||||
Some(0)
|
Some(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn handle_window_visibility_changed(&self, handle: HWND, wparam: WPARAM) -> Option<isize> {
|
||||||
|
if wparam.0 == 1 {
|
||||||
|
self.draw_window(handle, false);
|
||||||
|
}
|
||||||
|
None
|
||||||
|
}
|
||||||
|
|
||||||
fn handle_device_change_msg(&self, handle: HWND, wparam: WPARAM) -> Option<isize> {
|
fn handle_device_change_msg(&self, handle: HWND, wparam: WPARAM) -> Option<isize> {
|
||||||
if wparam.0 == DBT_DEVNODES_CHANGED as usize {
|
if wparam.0 == DBT_DEVNODES_CHANGED as usize {
|
||||||
// The reason for sending this message is to actually trigger a redraw of the window.
|
// The reason for sending this message is to actually trigger a redraw of the window.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue