e925444071
* chore: bump chromium in DEPS to 132.0.6817.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * chore: update chromium patches Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 5979290: Temoporarily disable crel on arm. | https://chromium-review.googlesource.com/c/chromium/src/+/5979290 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 5981701: Include callback.h instead of callback_forward.h | https://chromium-review.googlesource.com/c/chromium/src/+/5981701 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 5964918: [v8 code cache] Add a wpt_internal test demonstrating the code cache 304 problem | https://chromium-review.googlesource.com/c/chromium/src/+/5964918 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 5969697: Add NetworkTrafficAnnotationTag to PreconnectManager | https://chromium-review.googlesource.com/c/chromium/src/+/5969697 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * chore: update remaining patches Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * chore: bump chromium in DEPS to 132.0.6818.0 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * chore: update patches Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 5983492: MPArch GuestView: Have executeScript target correct frame | https://chromium-review.googlesource.com/c/chromium/src/+/5983492 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * chore: bump chromium in DEPS to 132.0.6820.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * chore: update patches Co-authored-by: VerteDinde <vertedinde@electronjs.org> * 5989717: Revert "win: Remove special check for 10.0.22621.2428 Win SDK version" | https://chromium-review.googlesource.com/c/chromium/src/+/5989717 Co-authored-by: VerteDinde <vertedinde@electronjs.org> * 5968218: Send PDF Searchifier running state to browser to show UX elements. | https://chromium-review.googlesource.com/c/chromium/src/+/5968218 Co-authored-by: VerteDinde <vertedinde@electronjs.org> * build: also update the MSVS_HASH for WOA Co-authored-by: VerteDinde <vertedinde@electronjs.org> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Keeley Hammond <khammond@slack-corp.com> Co-authored-by: VerteDinde <vertedinde@electronjs.org>
59 lines
2.5 KiB
Diff
59 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: clavin <clavin@electronjs.org>
|
|
Date: Mon, 11 Dec 2023 20:43:34 -0300
|
|
Subject: fix: activate background material on windows
|
|
|
|
This patch adds a condition to the HWND message handler to allow windows
|
|
with translucent background materials to become activated.
|
|
|
|
It also ensures the lParam of WM_NCACTIVATE is set to -1 so as to not repaint
|
|
the client area, which can lead to a title bar incorrectly being displayed in
|
|
frameless windows.
|
|
|
|
This patch likely can't be upstreamed as-is, as Chromium doesn't have
|
|
this use case in mind currently.
|
|
|
|
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
|
index ae24de9ce9d3a2d6c9d7612104e1ef13bbd84f9f..c7ce5bc2aaa8bd29c41c253bd9b6fc9e713ff5a5 100644
|
|
--- a/ui/views/win/hwnd_message_handler.cc
|
|
+++ b/ui/views/win/hwnd_message_handler.cc
|
|
@@ -909,13 +909,13 @@ void HWNDMessageHandler::FrameTypeChanged() {
|
|
|
|
void HWNDMessageHandler::PaintAsActiveChanged() {
|
|
if (!delegate_->HasNonClientView() || !delegate_->CanActivate() ||
|
|
- !delegate_->HasFrame() ||
|
|
+ (!delegate_->HasFrame() && !is_translucent_) ||
|
|
(delegate_->GetFrameMode() == FrameMode::CUSTOM_DRAWN)) {
|
|
return;
|
|
}
|
|
|
|
DefWindowProcWithRedrawLock(WM_NCACTIVATE, delegate_->ShouldPaintAsActive(),
|
|
- 0);
|
|
+ delegate_->HasFrame() ? 0 : -1);
|
|
}
|
|
|
|
void HWNDMessageHandler::SetWindowIcons(const gfx::ImageSkia& window_icon,
|
|
@@ -2264,17 +2264,18 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message,
|
|
if (IsVisible())
|
|
delegate_->SchedulePaint();
|
|
|
|
- // Calling DefWindowProc is only necessary if there's a system frame being
|
|
- // drawn. Otherwise it can draw an incorrect title bar and cause visual
|
|
- // corruption.
|
|
- if (!delegate_->HasFrame() ||
|
|
+ // If the window is translucent, it may have the Mica background.
|
|
+ // In that case, it's necessary to call |DefWindowProc|, but we can
|
|
+ // pass -1 in the lParam to prevent any non-client area elements from
|
|
+ // being displayed.
|
|
+ if ((!delegate_->HasFrame() && !is_translucent_) ||
|
|
delegate_->GetFrameMode() == FrameMode::CUSTOM_DRAWN) {
|
|
SetMsgHandled(TRUE);
|
|
return TRUE;
|
|
}
|
|
|
|
return DefWindowProcWithRedrawLock(WM_NCACTIVATE, paint_as_active || active,
|
|
- 0);
|
|
+ delegate_->HasFrame() ? 0 : -1);
|
|
}
|
|
|
|
LRESULT HWNDMessageHandler::OnNCCalcSize(BOOL mode, LPARAM l_param) {
|