New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: frameless mica/acrylic windows #39708
Merged
+96
−21
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0b5956e
fix: backgroundMaterial works with frameless
clavin 89ad584
TODO: fix frameless mica/acrylic windows
clavin bb63c63
update caption color appropriately
clavin d0cfd90
set background color properly
clavin 1791b04
refactor translucency method
clavin 62e03ee
actualization
clavin c524ad8
Merge branch 'main' into clavin/frameless-bg-mat
clavin File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
patches/chromium/fix_activate_background_material_on_windows.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
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 13268bd89c710690eed5296f4b2157e9476f195e..37de479e95d49f4d2b1d8164c9e3f6a7bcd82612 100644 | ||
--- a/ui/views/win/hwnd_message_handler.cc | ||
+++ b/ui/views/win/hwnd_message_handler.cc | ||
@@ -1094,7 +1094,7 @@ void HWNDMessageHandler::FrameTypeChanged() { | ||
|
||
void HWNDMessageHandler::PaintAsActiveChanged() { | ||
if (!delegate_->HasNonClientView() || !delegate_->CanActivate() || | ||
- !delegate_->HasFrame() || | ||
+ (!delegate_->HasFrame() && !is_translucent_) || | ||
(delegate_->GetFrameMode() == FrameMode::CUSTOM_DRAWN)) { | ||
return; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for a simple patch like this there is a chance upstreaming it, read the change log of the file and find the maintainer who has done related modifications, and ask them to review.