-
Notifications
You must be signed in to change notification settings - Fork 16.4k
fix: abnormal behavior of windows background material #46855
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
Conversation
😎Progress has been made on dynamically setting the background material. However, there's a 5-day holiday starting in my region, so I may need to wait until after the break to continue and complete the PR. |
20250507-232819.mp4Additional demonstration included. if (backgroundMaterial === 'auto') {
mainWindow?.setBackgroundColor('#00000000');
mainWindow?.setBackgroundMaterial('acrylic');
backgroundMaterial = 'acrylic';
} else {
mainWindow?.setBackgroundColor('#ffffff');
mainWindow?.setBackgroundMaterial('auto');
backgroundMaterial = 'auto';
} |
+ // translucent framed windows. Original code: !is_translucent_ && | ||
+ // delegate_->CanResize() See: | ||
+ // https://chromium-review.googlesource.com/c/chromium/src/+/6372329 | ||
+ const bool can_resize = delegate_->CanResize(); |
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.
This is to address the issue where a window with a frame and background material cannot be maximized.
5bddd27
to
14b719f
Compare
@zoy-l could you rebase this please? |
- if (!is_translucent_ && !custom_window_region_.is_valid() && | ||
+ // patch: fix_resolve_dynamic_background_material_update_issue_on_windows_11 | ||
+ // Our translucent windows use the native frame by default, and we should not | ||
+ // set a custom region when the window is maximized; otherwise, it will cause |
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.
Can all or part of this be upstreamed to Chromium?
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.
@codebytere I don't have much experience with this, but I can give it a try
c209317
to
502f7c4
Compare
@@ -103,7 +103,6 @@ fix_use_delegated_generic_capturer_when_available.patch | |||
expose_webblob_path_to_allow_embedders_to_get_file_paths.patch | |||
fix_move_autopipsettingshelper_behind_branding_buildflag.patch | |||
revert_remove_the_allowaggressivethrottlingwithwebsocket_feature.patch | |||
fix_activate_background_material_on_windows.patch |
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.
Did you intend to delete this? if yes, you also need to delete the patch file itself
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.
Ah, I might have missed this part during the rebase.😓
Perhaps some of the patches can be reduced by using |
Leave a legacy, might be of some reference value if someone wants to continue~ I don't have time to work on it right now. |
@zoy-l would you be willing to briefly say where you left off? What still needs to be done here? |
@codebytere Functionally everything is fine and working as expected — the above was only mentioned to reduce the number of patches. However, I did notice that a few tests related to |
@zoy-l awesome, thanks! that helps a lot! |
Description of Change
fix: #46753, #43345, #43196, #46882
PS: The description was written with the help of translation 🫡
Fixed applying background material correctly when creating windows on Windows, restored animations, and also fixed the issue where dynamically setting the background material had no effect.
20250429-220522.mp4
Checklist
npm test
passesRelease Notes
Notes: Fix inconsistent materials (Acrylic/Mica) and rounded corners in borderless browser window during maximize/restore operations on Windows 11