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

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

Issue 542113004: [Linux] Show preview contents for minimized windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use Compositor::SetVisible Created 6 years, 3 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 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()) {
« 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