summaryrefslogtreecommitdiffstats
path: root/views/screen_gtk.cc
diff options
context:
space:
mode:
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