Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: views/screen_gtk.cc

Issue 160474: Status bubble limping in TOOLKIT_VIEWS.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/screen.h ('k') | views/screen_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/screen_gtk.cc
===================================================================
--- views/screen_gtk.cc (revision 22173)
+++ views/screen_gtk.cc (working copy)
@@ -6,6 +6,8 @@
#include <gtk/gtk.h>
+#include "base/logging.h"
+
namespace views {
// static
@@ -15,5 +17,20 @@
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
« no previous file with comments | « views/screen.h ('k') | views/screen_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698