From 6b2db5681f6c50bb476d37bb16afe3fae7f288b7 Mon Sep 17 00:00:00 2001 From: Tom Anderson Date: Fri, 31 Jan 2020 14:57:33 -0800 Subject: [PATCH] Fix browser frame view not getting a relayout after a state change views::NonClientView has 2 things: a views::NonClientFrameView and a views::ClientView. We were previously only invalidating the layout on the ClientView after a state change. This was causing the browser frame to paint as if it were still maximized after restoring from a maximized state on Linux. Invalidating the layout of the frame view fixes the issue. BUG=1046122 R=sky Change-Id: I7da525efe1f436564ffffb410afe294e901e5d89 --- .../widget/desktop_aura/desktop_window_tree_host_platform.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc index 9abbce89586b..6c00d49eb3f8 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc @@ -717,6 +717,8 @@ void DesktopWindowTreeHostPlatform::Relayout() { NonClientView* non_client_view = widget->non_client_view(); // non_client_view may be NULL, especially during creation. if (non_client_view) { + if (non_client_view->frame_view()) + non_client_view->frame_view()->InvalidateLayout(); non_client_view->client_view()->InvalidateLayout(); non_client_view->InvalidateLayout(); } -- 2.21.0