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 1fd497f8b0197acafe82684fec3ffbc2739a1352..d9397296e0bb0d887f89e606836d9c45f8cfecda 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 |
@@ -1244,12 +1244,19 @@ void DesktopWindowTreeHostX11::OnWMStateUpdated() { |
// HWNDMessageHandler::GetClientAreaBounds() returns an empty size when the |
// window is minimized. On Linux, returning empty size in GetBounds() or |
// SetBounds() does not work. |
+ // We also propagate the minimization to the compositor, to makes sure that we |
+ // don't draw any 'blank' frames that could be noticed in applications such as |
+ // window manager previews, which show content even when a window is |
+ // minimized. |
bool is_minimized = IsMinimized(); |
if (is_minimized != was_minimized) { |
- if (is_minimized) |
+ if (is_minimized) { |
+ compositor()->SetVisible(false); |
content_window_->Hide(); |
- else |
+ } else { |
content_window_->Show(); |
+ compositor()->SetVisible(true); |
+ } |
} |
if (restored_bounds_.IsEmpty()) { |