diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-08 20:50:58 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-08 20:50:58 +0000 |
commit | aae8491ce72666c28b0eb3ec16687c573797ac0f (patch) | |
tree | 021e6d0d6869aec1e3171b74659d26c23e416bd2 /views/screen_gtk.cc | |
parent | 346ae5115970cdbecf959fa4dd6ef26ee91cfb4d (diff) | |
download | chromium_src-aae8491ce72666c28b0eb3ec16687c573797ac0f.zip chromium_src-aae8491ce72666c28b0eb3ec16687c573797ac0f.tar.gz chromium_src-aae8491ce72666c28b0eb3ec16687c573797ac0f.tar.bz2 |
Implements Screen::GetMonitorAreaNearestPoint for views/gtk.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/266019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28443 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/screen_gtk.cc')
-rw-r--r-- | views/screen_gtk.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/views/screen_gtk.cc b/views/screen_gtk.cc index 2a30d90..e0df1a9 100644 --- a/views/screen_gtk.cc +++ b/views/screen_gtk.cc @@ -38,8 +38,11 @@ gfx::Rect Screen::GetMonitorWorkAreaNearestWindow(gfx::NativeWindow window) { // static gfx::Rect Screen::GetMonitorAreaNearestPoint(const gfx::Point& point) { - // TODO: use |point|. - return GetPrimaryMonitorBounds(); + GdkScreen* screen = gdk_screen_get_default(); + gint monitor = gdk_screen_get_monitor_at_point(screen, point.x(), point.y()); + GdkRectangle bounds; + gdk_screen_get_monitor_geometry(screen, monitor, &bounds); + return gfx::Rect(bounds); } } // namespace |