summaryrefslogtreecommitdiffstats
path: root/views/screen_gtk.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 18:04:14 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 18:04:14 +0000
commita65808d30e438a889aac5a97227ca5a0704bc471 (patch)
tree353d270c3f80f7097580d486f53163c66d3626a1 /views/screen_gtk.cc
parent3fe92d85a949ff4b7b58405d1a91ba9752e4f477 (diff)
downloadchromium_src-a65808d30e438a889aac5a97227ca5a0704bc471.zip
chromium_src-a65808d30e438a889aac5a97227ca5a0704bc471.tar.gz
chromium_src-a65808d30e438a889aac5a97227ca5a0704bc471.tar.bz2
Adds views::Screen::GetMonitorAreaNearestPoint.
BUG=none TEST=none Review URL: http://codereview.chromium.org/199023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25476 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/screen_gtk.cc')
-rw-r--r--views/screen_gtk.cc16
1 files changed, 13 insertions, 3 deletions
diff --git a/views/screen_gtk.cc b/views/screen_gtk.cc
index 22aaa44..2a30d90 100644
--- a/views/screen_gtk.cc
+++ b/views/screen_gtk.cc
@@ -17,9 +17,7 @@ gfx::Point Screen::GetCursorScreenPoint() {
return gfx::Point(x, y);
}
-// static
-gfx::Rect Screen::GetMonitorWorkAreaNearestWindow(gfx::NativeWindow window) {
- // TODO(beng): use |window|.
+gfx::Rect static GetPrimaryMonitorBounds() {
guchar* raw_data = NULL;
gint data_len = 0;
gboolean success = gdk_property_get(gdk_get_default_root_window(),
@@ -32,5 +30,17 @@ gfx::Rect Screen::GetMonitorWorkAreaNearestWindow(gfx::NativeWindow window) {
return gfx::Rect(data[0], data[1], data[0] + data[2], data[1] + data[3]);
}
+// static
+gfx::Rect Screen::GetMonitorWorkAreaNearestWindow(gfx::NativeWindow window) {
+ // TODO(beng): use |window|.
+ return GetPrimaryMonitorBounds();
+}
+
+// static
+gfx::Rect Screen::GetMonitorAreaNearestPoint(const gfx::Point& point) {
+ // TODO: use |point|.
+ return GetPrimaryMonitorBounds();
+}
+
} // namespace