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

Unified Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 1125383008: Support MINIMIZED, MAXIMIZED, FULLSCREEN state when showing a chrome window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index 125e8f0c1551fead63dc6ec4544f48b58438b6f6..9545be9c1bdca11cfdf9a547754cc2838d80de4e 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -368,9 +368,21 @@ void DesktopWindowTreeHostX11::ShowWindowWithState(
if (!window_mapped_)
MapWindow(show_state);
- if (show_state == ui::SHOW_STATE_NORMAL ||
- show_state == ui::SHOW_STATE_MAXIMIZED) {
- Activate();
+ switch (show_state) {
+ case ui::SHOW_STATE_NORMAL:
+ Activate();
+ break;
+ case ui::SHOW_STATE_MAXIMIZED:
+ Maximize();
+ break;
+ case ui::SHOW_STATE_MINIMIZED:
+ Minimize();
+ break;
+ case ui::SHOW_STATE_FULLSCREEN:
+ SetFullscreen(TRUE);
Peter Kasting 2015/05/14 00:10:13 Shouldn't this be "true" instead of "TRUE"?
joone 2015/05/14 18:18:57 Yes, it should be true. I'll fix it.
+ break;
+ default:
+ break;
}
native_widget_delegate_->AsWidget()->SetInitialFocus(show_state);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698