mirror of https://github.com/electron/electron
25 lines
1.0 KiB
Diff
25 lines
1.0 KiB
Diff
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
|
|
index 23905a6b7f739ff3c6f391f984527ef5d2ed0bd9..ee72bad1b884677b02cc2f86ea307742e5528bad 100644
|
|
--- a/ui/views/win/hwnd_message_handler.cc
|
|
+++ b/ui/views/win/hwnd_message_handler.cc
|
|
@@ -901,7 +901,7 @@ void HWNDMessageHandler::FrameTypeChanged() {
|
|
|
|
void HWNDMessageHandler::PaintAsActiveChanged() {
|
|
if (!delegate_->HasNonClientView() || !delegate_->CanActivate() ||
|
|
- !delegate_->HasFrame() ||
|
|
+ (!delegate_->HasFrame() && !is_translucent_) ||
|
|
(delegate_->GetFrameMode() == FrameMode::CUSTOM_DRAWN)) {
|
|
return;
|
|
}
|