| 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
|
|
|
|
|