fix: titlebar incorrectly displayed on frameless windows (#40749)
* fix: titlebar incorrectly displayed on frameless windows * fix: enable transparency for Mica windows * Refactor ShouldWindowContentsBeTransparent --------- Co-authored-by: clavin <clavin@electronjs.org>
This commit is contained in:
parent
7995c56fb0
commit
a208d45aca
2 changed files with 42 additions and 7 deletions
|
@ -135,12 +135,12 @@ void ElectronDesktopWindowTreeHostWin::OnNativeThemeUpdated(
|
|||
|
||||
bool ElectronDesktopWindowTreeHostWin::ShouldWindowContentsBeTransparent()
|
||||
const {
|
||||
// Window should be marked as opaque if no transparency setting has been set,
|
||||
// otherwise videos rendered in the window will trigger a DirectComposition
|
||||
// redraw for every frame.
|
||||
// Window should be marked as opaque if no transparency setting has been
|
||||
// set, otherwise animations or videos rendered in the window will trigger a
|
||||
// DirectComposition redraw for every frame.
|
||||
// https://github.com/electron/electron/pull/39895
|
||||
return native_window_view_->GetOpacity() < 1.0 ||
|
||||
native_window_view_->transparent();
|
||||
native_window_view_->IsTranslucent();
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue