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

Unified Diff: views/widget/native_widget_gtk.cc

Issue 7790010: Revert 98679 - Restoring a session should restore window minimization state on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
===================================================================
--- views/widget/native_widget_gtk.cc (revision 98696)
+++ views/widget/native_widget_gtk.cc (working copy)
@@ -1004,9 +1004,8 @@
SetBoundsConstrained(bounds, NULL);
}
-void NativeWidgetGtk::GetWindowPlacement(
- gfx::Rect* bounds,
- ui::WindowShowState* show_state) const {
+void NativeWidgetGtk::GetWindowBoundsAndMaximizedState(gfx::Rect* bounds,
+ bool* maximized) const {
// Do nothing for now. ChromeOS isn't yet saving window placement.
}
@@ -1187,9 +1186,9 @@
Show();
}
-void NativeWidgetGtk::ShowWithWindowState(ui::WindowShowState show_state) {
+void NativeWidgetGtk::ShowWithState(ShowState state) {
// No concept of maximization (yet) on ChromeOS.
- if (show_state == ui::SHOW_STATE_INACTIVE)
+ if (state == internal::NativeWidgetPrivate::SHOW_INACTIVE)
gtk_window_set_focus_on_map(GetNativeWindow(), false);
gtk_widget_show(GetNativeView());
}
@@ -2077,14 +2076,10 @@
if (!GetWidget()->widget_delegate())
return;
- 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;
+ bool maximized = window_state_ & GDK_WINDOW_STATE_MAXIMIZED;
GetWidget()->widget_delegate()->SaveWindowPlacement(
GetWidget()->GetWindowScreenBounds(),
- show_state);
+ maximized);
}
////////////////////////////////////////////////////////////////////////////////
« 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