Commit 3a3f2f57 authored by joone.hur's avatar joone.hur Committed by Commit bot

Support MINIMIZED, MAXIMIZED, FULLSCREEN state when showing a chrome window.

Some of ui::WindowShowState were not supported in Linux so this CL implemented
SHOW_STATE_MINIMIZED, SHOW_STATE_MAXIMIZED, and SHOW_STATE_FULLSCREEN state.

BUG=473228

Review URL: https://codereview.chromium.org/1125383008

Cr-Commit-Position: refs/heads/master@{#329764}
parent 9f3e29c9
...@@ -368,9 +368,21 @@ void DesktopWindowTreeHostX11::ShowWindowWithState( ...@@ -368,9 +368,21 @@ void DesktopWindowTreeHostX11::ShowWindowWithState(
if (!window_mapped_) if (!window_mapped_)
MapWindow(show_state); MapWindow(show_state);
if (show_state == ui::SHOW_STATE_NORMAL || switch (show_state) {
show_state == ui::SHOW_STATE_MAXIMIZED) { case ui::SHOW_STATE_NORMAL:
Activate(); Activate();
break;
case ui::SHOW_STATE_MAXIMIZED:
Maximize();
break;
case ui::SHOW_STATE_MINIMIZED:
Minimize();
break;
case ui::SHOW_STATE_FULLSCREEN:
SetFullscreen(TRUE);
break;
default:
break;
} }
native_widget_delegate_->AsWidget()->SetInitialFocus(show_state); native_widget_delegate_->AsWidget()->SetInitialFocus(show_state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment