New issue
Advanced search Search tips

Issue 715791 link

Starred by 1 user

Issue metadata

Status: Archived
Owner: ----
Closed: Aug 21
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

DesktopWindowTreeHostWin::GetWorkAreaBoundsInScreen() might return arbitrary rect when a display is added or removed

Project Member Reported by stanisc@chromium.org, Apr 26 2017

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);
}
 
Summary: DesktopWindowTreeHostWin::GetWorkAreaBoundsInScreen() might return arbitrary rect when a display is added or removed (was: DesktopWindowTreeHostWin::GetWorkAreaBoundsInScreen() might return arbitrary rect when display configuration changes)
FullscreenHandler::SetFullscreenImpl has a similar issue which might result is positioning Chrome to an arbitrary rectangle.
Status: Archived (was: Untriaged)
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!
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