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

Unified Diff: views/widget/native_widget_gtk.cc

Issue 7748036: Restoring a session should restore window minimization state on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 4 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/widget/native_widget_gtk.h ('k') | views/widget/native_widget_private.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/native_widget_gtk.cc
diff --git a/views/widget/native_widget_gtk.cc b/views/widget/native_widget_gtk.cc
index dd57b005935b97dda60c1a543fe7a9e95d125ec5..3db5d9156b28add9b005181cd87e07e4c604eafa 100644
--- a/views/widget/native_widget_gtk.cc
+++ b/views/widget/native_widget_gtk.cc
@@ -1004,8 +1004,9 @@ void NativeWidgetGtk::CenterWindow(const gfx::Size& size) {
SetBoundsConstrained(bounds, NULL);
}
-void NativeWidgetGtk::GetWindowBoundsAndMaximizedState(gfx::Rect* bounds,
- bool* maximized) const {
+void NativeWidgetGtk::GetWindowPlacement(
+ gfx::Rect* bounds,
+ ui::WindowShowState* show_state) const {
// Do nothing for now. ChromeOS isn't yet saving window placement.
}
@@ -1186,9 +1187,9 @@ void NativeWidgetGtk::ShowMaximizedWithBounds(
Show();
}
-void NativeWidgetGtk::ShowWithState(ShowState state) {
+void NativeWidgetGtk::ShowWithWindowState(ui::WindowShowState show_state) {
// No concept of maximization (yet) on ChromeOS.
- if (state == internal::NativeWidgetPrivate::SHOW_INACTIVE)
+ if (show_state == ui::SHOW_STATE_INACTIVE)
gtk_window_set_focus_on_map(GetNativeWindow(), false);
gtk_widget_show(GetNativeView());
}
@@ -2076,10 +2077,14 @@ void NativeWidgetGtk::SaveWindowPosition() {
if (!GetWidget()->widget_delegate())
return;
- bool maximized = window_state_ & GDK_WINDOW_STATE_MAXIMIZED;
+ ui::WindowShowState show_state = ui::SHOW_STATE_NORMAL;
+ if (IsMaximized())
+ show_state = ui::SHOW_STATE_MAXIMIZED;
+ else if (IsMinimized())
+ show_state = ui::SHOW_STATE_MINIMIZED;
GetWidget()->widget_delegate()->SaveWindowPlacement(
GetWidget()->GetWindowScreenBounds(),
- maximized);
+ show_state);
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « views/widget/native_widget_gtk.h ('k') | views/widget/native_widget_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698