parent
fd8336c8cb
commit
bfc066a1ec
1 changed files with 3 additions and 1 deletions
|
@ -799,7 +799,9 @@ fn handle_display_change_msg(handle: HWND, state_ptr: Rc<WindowsWindowStatePtr>)
|
||||||
// display disconnected
|
// display disconnected
|
||||||
// in this case, the OS will move our window to another monitor, and minimize it.
|
// in this case, the OS will move our window to another monitor, and minimize it.
|
||||||
// we deminimize the window and query the monitor after moving
|
// we deminimize the window and query the monitor after moving
|
||||||
unsafe { ShowWindow(handle, SW_SHOWNORMAL) };
|
unsafe {
|
||||||
|
let _ = ShowWindow(handle, SW_SHOWNORMAL);
|
||||||
|
};
|
||||||
let new_monitor = unsafe { MonitorFromWindow(handle, MONITOR_DEFAULTTONULL) };
|
let new_monitor = unsafe { MonitorFromWindow(handle, MONITOR_DEFAULTTONULL) };
|
||||||
// all monitors disconnected
|
// all monitors disconnected
|
||||||
if new_monitor.is_invalid() {
|
if new_monitor.is_invalid() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue