Skip to content

Commit

Permalink
5167921: Remove Widget::IsTranslucentWindowOpacitySupported
Browse files Browse the repository at this point in the history
  • Loading branch information
jkleinsc committed Jan 25, 2024
1 parent 759f174 commit 53d9c82
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions shell/browser/ui/electron_desktop_window_tree_host_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ElectronDesktopWindowTreeHostLinux::~ElectronDesktopWindowTreeHostLinux() =

bool ElectronDesktopWindowTreeHostLinux::SupportsClientFrameShadow() const {
return platform_window()->CanSetDecorationInsets() &&
platform_window()->IsTranslucentWindowOpacitySupported();
views::Widget::IsWindowCompositingSupported();
}

void ElectronDesktopWindowTreeHostLinux::OnWidgetInitDone() {
Expand Down Expand Up @@ -97,6 +97,8 @@ void ElectronDesktopWindowTreeHostLinux::UpdateWindowState(
case ui::PlatformWindowState::kSnappedPrimary:
case ui::PlatformWindowState::kSnappedSecondary:
case ui::PlatformWindowState::kFloated:
case ui::PlatformWindowState::kPinnedFullscreen:
case ui::PlatformWindowState::kTrustedPinnedFullscreen:
break;
}
switch (new_state) {
Expand All @@ -114,6 +116,8 @@ void ElectronDesktopWindowTreeHostLinux::UpdateWindowState(
case ui::PlatformWindowState::kSnappedPrimary:
case ui::PlatformWindowState::kSnappedSecondary:
case ui::PlatformWindowState::kFloated:
case ui::PlatformWindowState::kPinnedFullscreen:
case ui::PlatformWindowState::kTrustedPinnedFullscreen:
break;
}
window_state_ = new_state;
Expand Down Expand Up @@ -146,7 +150,7 @@ void ElectronDesktopWindowTreeHostLinux::UpdateClientDecorationHints(
bool showing_frame = !native_window_view_->IsFullscreen();
float scale = device_scale_factor();

bool should_set_opaque_region = window->IsTranslucentWindowOpacitySupported();
bool should_set_opaque_region = views::Widget::IsWindowCompositingSupported();

gfx::Insets insets;
gfx::Insets input_insets;
Expand Down

0 comments on commit 53d9c82

Please sign in to comment.