diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-01 00:07:00 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-01 00:07:00 +0000 |
commit | a2920638f52df5d5e0e3ea86c1802d4a7416abe5 (patch) | |
tree | 635245f5d524df6ce6a10ec75db72f81639a4156 /views/screen_gtk.cc | |
parent | fb3ef9384cc76c4237f98e5aa38d2689cc7b60cd (diff) | |
download | chromium_src-a2920638f52df5d5e0e3ea86c1802d4a7416abe5.zip chromium_src-a2920638f52df5d5e0e3ea86c1802d4a7416abe5.tar.gz chromium_src-a2920638f52df5d5e0e3ea86c1802d4a7416abe5.tar.bz2 |
Status bubble limping in TOOLKIT_VIEWS.
Add CreateTransparentFloatingWidget method to Widget and add Init/SetContentsView methods.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/160474
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22229 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/screen_gtk.cc')
-rw-r--r-- | views/screen_gtk.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/views/screen_gtk.cc b/views/screen_gtk.cc index efb8775..22aaa44 100644 --- a/views/screen_gtk.cc +++ b/views/screen_gtk.cc @@ -6,6 +6,8 @@ #include <gtk/gtk.h> +#include "base/logging.h" + namespace views { // static @@ -15,5 +17,20 @@ gfx::Point Screen::GetCursorScreenPoint() { return gfx::Point(x, y); } +// static +gfx::Rect Screen::GetMonitorWorkAreaNearestWindow(gfx::NativeWindow window) { + // TODO(beng): use |window|. + guchar* raw_data = NULL; + gint data_len = 0; + gboolean success = gdk_property_get(gdk_get_default_root_window(), + gdk_atom_intern("_NET_WORKAREA", FALSE), + gdk_atom_intern("CARDINAL", FALSE), + 0, 0xFF, false, NULL, NULL, &data_len, + &raw_data); + DCHECK(success); + glong* data = reinterpret_cast<glong*>(raw_data); + return gfx::Rect(data[0], data[1], data[0] + data[2], data[1] + data[3]); +} + } // namespace |