diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-12 21:15:36 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-12 21:15:36 +0000 |
commit | 2e20722d6fe92dc0296861b1f0474af424e5c9ba (patch) | |
tree | 68185c24605ad120c766c11e74f6d78efbf68c8a /views/widget/native_widget_gtk.cc | |
parent | 93156cecb487ad7f1d7e307618cd58bd6546da29 (diff) | |
download | chromium_src-2e20722d6fe92dc0296861b1f0474af424e5c9ba.zip chromium_src-2e20722d6fe92dc0296861b1f0474af424e5c9ba.tar.gz chromium_src-2e20722d6fe92dc0296861b1f0474af424e5c9ba.tar.bz2 |
touchui: In the absence of a real window manager, move/resize the window as necessary for maximize.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7748047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100768 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget/native_widget_gtk.cc')
-rw-r--r-- | views/widget/native_widget_gtk.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/views/widget/native_widget_gtk.cc b/views/widget/native_widget_gtk.cc index 57fd0de..7cb5892 100644 --- a/views/widget/native_widget_gtk.cc +++ b/views/widget/native_widget_gtk.cc @@ -1218,7 +1218,16 @@ void NativeWidgetGtk::SetAlwaysOnTop(bool on_top) { } void NativeWidgetGtk::Maximize() { +#if defined(TOUCH_UI) + // There may not be a window manager. So maximize ourselves: move to the + // top-left corner and resize to the entire bounds of the screen. + gfx::Rect screen = gfx::Screen::GetMonitorAreaNearestWindow(GetNativeView()); + gtk_window_move(GTK_WINDOW(GetNativeWindow()), screen.x(), screen.y()); + gtk_widget_set_size_request(GTK_WIDGET(GetNativeWindow()), + screen.width(), screen.height()); +#else gtk_window_maximize(GetNativeWindow()); +#endif } void NativeWidgetGtk::Minimize() { |