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

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

Issue 340783004: visibility bug fix for https://crbug.com/246844 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc » ('j') | 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 f5465bfae82b59ee9726b3143246ded949a02817..3661c2f60fc94470661d7b0e44a4655afaf47cca 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,24 @@ void DesktopWindowTreeHostX11::OnWMStateUpdated() {
if (!ui::GetAtomArrayProperty(xwindow_, "_NET_WM_STATE", &atom_list))
return;
+ bool was_minimized = IsMinimized();
+ bool is_minimized;
+
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.
Elliot Glaysher 2014/06/19 20:09:56 If you go this route, please also mention that on
Zhen Wang 2014/06/19 22:45:01 This is just a note. I have discussed with Elliot
+ is_minimized = IsMinimized();
Elliot Glaysher 2014/06/19 20:09:56 Move the declaration of bool is_minimized here, si
+ if (was_minimized == false && is_minimized == true) {
+ content_window_->Hide();
+ } else if (was_minimized == true && is_minimized == false) {
+ content_window_->Show();
+ }
+
if (restored_bounds_.IsEmpty()) {
DCHECK(!IsFullscreen());
if (IsMaximized()) {
« no previous file with comments | « no previous file | ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698