diff options
Diffstat (limited to 'views/screen_win.cc')
-rw-r--r-- | views/screen_win.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/views/screen_win.cc b/views/screen_win.cc index 04191af..b6e7a15 100644 --- a/views/screen_win.cc +++ b/views/screen_win.cc @@ -15,5 +15,14 @@ gfx::Point Screen::GetCursorScreenPoint() { return gfx::Point(pt); } +// static +gfx::Rect Screen::GetMonitorWorkAreaNearestWindow(gfx::NativeWindow window) { + MONITORINFO monitor_info; + monitor_info.cbSize = sizeof(monitor_info); + GetMonitorInfo(MonitorFromWindow(window, MONITOR_DEFAULTTONEAREST), + &monitor_info); + return gfx::Rect(monitor_info.rcWork); +} + } // namespace |