fix: backgroundMaterial on initial activate (36-x-y) (#46792)

* fix: `backgroundMaterial` on initial activate (#46657)

* empty commit

---------

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
Charles Kerr 2025-04-25 21:13:51 -05:00 committed by GitHub
parent 3981c173ef
commit 5c2f70c1d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,7 +14,7 @@ This patch likely can't be upstreamed as-is, as Chromium doesn't have
this use case in mind currently. this use case in mind currently.
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index ecab7d7f95998a055f01d7b5180a8fb80eddb32c..96cf055f1144887c0b4b4aef83898508016b310f 100644 index ecab7d7f95998a055f01d7b5180a8fb80eddb32c..5c74a092920cdb3b7e98d218c75874cac2d0542f 100644
--- a/ui/views/win/hwnd_message_handler.cc --- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc
@@ -954,13 +954,13 @@ void HWNDMessageHandler::FrameTypeChanged() { @@ -954,13 +954,13 @@ void HWNDMessageHandler::FrameTypeChanged() {
@ -33,6 +33,15 @@ index ecab7d7f95998a055f01d7b5180a8fb80eddb32c..96cf055f1144887c0b4b4aef83898508
} }
void HWNDMessageHandler::SetWindowIcons(const gfx::ImageSkia& window_icon, void HWNDMessageHandler::SetWindowIcons(const gfx::ImageSkia& window_icon,
@@ -1757,7 +1757,7 @@ void HWNDMessageHandler::OnActivateApp(BOOL active, DWORD thread_id) {
if (delegate_->HasNonClientView() && !active &&
thread_id != GetCurrentThreadId()) {
// Update the native frame if it is rendering the non-client area.
- if (HasSystemFrame()) {
+ if (is_translucent_ || HasSystemFrame()) {
DefWindowProcWithRedrawLock(WM_NCACTIVATE, FALSE, 0);
}
}
@@ -2365,17 +2365,18 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message, @@ -2365,17 +2365,18 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message,
delegate_->SchedulePaint(); delegate_->SchedulePaint();
} }