| 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 f5465bfae82b59ee9726b3143246ded949a02817..232420330b5fd032201f1164008b2a08e8c7fb04 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
|
| @@ -1180,10 +1180,28 @@ void DesktopWindowTreeHostX11::OnWMStateUpdated() {
|
| if (!ui::GetAtomArrayProperty(xwindow_, "_NET_WM_STATE", &atom_list))
|
| return;
|
|
|
| + bool was_minimized = IsMinimized();
|
| +
|
| window_properties_.clear();
|
| std::copy(atom_list.begin(), atom_list.end(),
|
| inserter(window_properties_, window_properties_.begin()));
|
|
|
| + // Propagate the window minimization information to the content window, so
|
| + // the render side can update its visibility properly. OnWMStateUpdated() is
|
| + // called by PropertyNofify event from DispatchEvent() when the browser is
|
| + // minimized or shown from minimized state. On Windows, this is realized by
|
| + // calling OnHostResized() with an empty size. In particular,
|
| + // HWNDMessageHandler::GetClientAreaBounds() returns an empty size when the
|
| + // window is minimized. On Linux, returning empty size in GetBounds() or
|
| + // SetBounds() does not work.
|
| + bool is_minimized = IsMinimized();
|
| + if (is_minimized != was_minimized) {
|
| + if (is_minimized)
|
| + content_window_->Hide();
|
| + else
|
| + content_window_->Show();
|
| + }
|
| +
|
| if (restored_bounds_.IsEmpty()) {
|
| DCHECK(!IsFullscreen());
|
| if (IsMaximized()) {
|
|
|