2023-09-11 12:51:54 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: clavin <clavin@electronjs.org>
|
|
|
|
Date: Wed, 30 Aug 2023 18:15:36 -0700
|
|
|
|
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.
|
|
|
|
|
|
|
|
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
|
2023-11-14 21:21:32 +00:00
|
|
|
index f233b50629796be30962977f1b53f54cace4f783..7ba18759b1fc4ff1727a603d470db4ae70d9e9c4 100644
|
2023-09-11 12:51:54 +00:00
|
|
|
--- a/ui/views/win/hwnd_message_handler.cc
|
|
|
|
+++ b/ui/views/win/hwnd_message_handler.cc
|
2023-11-14 21:21:32 +00:00
|
|
|
@@ -900,7 +900,7 @@ void HWNDMessageHandler::FrameTypeChanged() {
|
2023-09-11 12:51:54 +00:00
|
|
|
|
|
|
|
void HWNDMessageHandler::PaintAsActiveChanged() {
|
|
|
|
if (!delegate_->HasNonClientView() || !delegate_->CanActivate() ||
|
|
|
|
- !delegate_->HasFrame() ||
|
|
|
|
+ (!delegate_->HasFrame() && !is_translucent_) ||
|
|
|
|
(delegate_->GetFrameMode() == FrameMode::CUSTOM_DRAWN)) {
|
|
|
|
return;
|
|
|
|
}
|