diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2020-03-10 07:18:00 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2020-03-10 10:09:41 +0000 |
commit | 0c8c16bcbd27ce5593911a5368dd7d45892b5306 (patch) | |
tree | 875746535131474f20383b859d7cab22021b9f64 /community/chromium/upstream-rebuild-Linux-frame-button-cache-when-activation.patch | |
parent | 9a9c92814f4cdfb6c0e0ea64de80dd6fc6768354 (diff) | |
download | aports-0c8c16bcbd27ce5593911a5368dd7d45892b5306.tar.bz2 aports-0c8c16bcbd27ce5593911a5368dd7d45892b5306.tar.xz |
community/chromium: fix build and upgrade to 80.0.3987.122
Diffstat (limited to 'community/chromium/upstream-rebuild-Linux-frame-button-cache-when-activation.patch')
-rw-r--r-- | community/chromium/upstream-rebuild-Linux-frame-button-cache-when-activation.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/community/chromium/upstream-rebuild-Linux-frame-button-cache-when-activation.patch b/community/chromium/upstream-rebuild-Linux-frame-button-cache-when-activation.patch new file mode 100644 index 0000000000..e334cde056 --- /dev/null +++ b/community/chromium/upstream-rebuild-Linux-frame-button-cache-when-activation.patch @@ -0,0 +1,62 @@ +From d10f885b9327399be9348b780967ebd6b7f2c4bc Mon Sep 17 00:00:00 2001 +From: Tom Anderson <thomasanderson@chromium.org> +Date: Fri, 7 Feb 2020 22:44:54 +0000 +Subject: [PATCH] Rebuild Linux frame button cache when activation state + changes + +This fixes an issue where the frame buttons would always render in an +inactive state on Linux (see repro steps in bug 1049258). + +Bug: 1049258 +R=sky +CC=pkasting + +Change-Id: Ic5af33199003e1d1cdf6cedf506e32388ea11fa9 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2044538 +Auto-Submit: Thomas Anderson <thomasanderson@chromium.org> +Commit-Queue: Scott Violet <sky@chromium.org> +Reviewed-by: Scott Violet <sky@chromium.org> +Cr-Commit-Position: refs/heads/master@{#739585} +--- + .../ui/views/frame/desktop_linux_browser_frame_view.cc | 6 +++--- + .../desktop_aura/desktop_window_tree_host_platform.cc | 3 +++ + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/chrome/browser/ui/views/frame/desktop_linux_browser_frame_view.cc b/chrome/browser/ui/views/frame/desktop_linux_browser_frame_view.cc +index 954e776057f..4f579955675 100644 +--- chrome/browser/ui/views/frame/desktop_linux_browser_frame_view.cc ++++ chrome/browser/ui/views/frame/desktop_linux_browser_frame_view.cc +@@ -22,13 +22,13 @@ DesktopLinuxBrowserFrameView::DesktopLinuxBrowserFrameView( + : OpaqueBrowserFrameView(frame, browser_view, layout), + nav_button_provider_(std::move(nav_button_provider)) {} + +-DesktopLinuxBrowserFrameView::~DesktopLinuxBrowserFrameView() {} ++DesktopLinuxBrowserFrameView::~DesktopLinuxBrowserFrameView() = default; + + void DesktopLinuxBrowserFrameView::Layout() { + // Calling MaybeUpdateCachedFrameButtonImages() from Layout() is sufficient to + // catch all cases that could update the appearance, since +- // DesktopWindowTreeHostPlatform::OnWindowStateChanged() does a layout any +- // time any properties change. ++ // DesktopWindowTreeHostPlatform::On{Window,Activation}StateChanged() does a ++ // layout any time the maximized and activation state changes, respectively. + MaybeUpdateCachedFrameButtonImages(); + OpaqueBrowserFrameView::Layout(); + } +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 9c695d8e5b1..9662f19aa90 100644 +--- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc ++++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc +@@ -677,9 +677,12 @@ void DesktopWindowTreeHostPlatform::OnCloseRequest() { + } + + void DesktopWindowTreeHostPlatform::OnActivationChanged(bool active) { ++ if (is_active_ == active) ++ return; + is_active_ = active; + aura::WindowTreeHostPlatform::OnActivationChanged(active); + desktop_native_widget_aura_->HandleActivationChanged(active); ++ ScheduleRelayout(); + } + + base::Optional<gfx::Size> |