DesktopWindowTreeHostWin::GetWorkAreaBoundsInScreen() might return arbitrary rect when a display is added or removed |
||
Issue description
When monitor configuration is changing (i.e. a monitor is added or removed) it looks like the driver gets reset and if GetMonitorInfo is called at that time it would return FALSE and MONITORINFO struct would contain garbage.
This means that the code below might return an arbitrary rect.
Please investigate if that might cause any unpredictable issues.
gfx::Rect DesktopWindowTreeHostWin::GetWorkAreaBoundsInScreen() const {
MONITORINFO monitor_info;
monitor_info.cbSize = sizeof(monitor_info);
GetMonitorInfo(MonitorFromWindow(message_handler_->hwnd(),
MONITOR_DEFAULTTONEAREST),
&monitor_info);
gfx::Rect pixel_bounds = gfx::Rect(monitor_info.rcWork);
return display::win::ScreenWin::ScreenToDIPRect(GetHWND(), pixel_bounds);
}
,
Apr 26 2017
FullscreenHandler::SetFullscreenImpl has a similar issue which might result is positioning Chrome to an arbitrary rectangle.
,
Aug 21
Archiving old bugs that haven't been actively assigned in over a year. If you feel this issue should still be addressed, feel free to reopen it or to file a new issue. Thanks!
,
Aug 21
Archiving old bugs that haven't been actively assigned in over a year. If you feel this issue should still be addressed, feel free to reopen it or to file a new issue. Thanks! |
||
►
Sign in to add a comment |
||
Comment 1 by stanisc@chromium.org
, Apr 26 2017