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/window | |
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/window')
-rw-r--r-- | views/window/window_gtk.cc | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/views/window/window_gtk.cc b/views/window/window_gtk.cc index 076511e..11c2a77 100644 --- a/views/window/window_gtk.cc +++ b/views/window/window_gtk.cc @@ -7,6 +7,7 @@ #include "app/gfx/path.h" #include "app/l10n_util.h" #include "base/gfx/rect.h" +#include "views/screen.h" #include "views/widget/root_view.h" #include "views/window/custom_frame_view.h" #include "views/window/hit_test.h" @@ -70,19 +71,6 @@ GdkCursorType HitTestCodeToGdkCursorType(int hittest_code) { return GDK_ARROW; } -gfx::Rect GetScreenWorkArea(GdkWindow* 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 namespace views { @@ -442,7 +430,7 @@ void WindowGtk::SizeWindowToDefault(GtkWindow* parent) { center_rect = gfx::Rect(parent_x, parent_y, parent_w, parent_h); } else { // We have no parent window, center over the screen. - center_rect = GetScreenWorkArea(GTK_WIDGET(GetNativeWindow())->window); + center_rect = Screen::GetMonitorWorkAreaNearestWindow(GetNativeWindow()); } gfx::Size size = non_client_view_->GetPreferredSize(); gfx::Rect bounds(center_rect.x() + (center_rect.width() - size.width()) / 2, |