Skip to content

Commit

Permalink
fixup! Remove //ui/ozone/buildflags.h
Browse files Browse the repository at this point in the history
  • Loading branch information
deepak1556 committed Dec 21, 2023
1 parent 4ded9e7 commit 3893f92
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions shell/browser/native_window_views.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,7 @@ gfx::Size WindowSizeToContentSizeBuggy(HWND hwnd, const gfx::Size& size) {

#endif

bool CreateGlobalMenuBar() {
return ui::OzonePlatform::GetInstance()
->GetPlatformProperties()
.supports_global_application_menus;
}

bool IsX11() {
[[maybe_unused]] bool IsX11() {
return ui::OzonePlatform::GetInstance()
->GetPlatformProperties()
.electron_can_call_x11;
Expand Down Expand Up @@ -1292,7 +1286,10 @@ void NativeWindowViews::SetMenu(ElectronMenuModel* menu_model) {
}

// Use global application menu bar when possible.
if (CreateGlobalMenuBar() && ShouldUseGlobalMenuBar()) {
bool can_use_global_menus = ui::OzonePlatform::GetInstance()
->GetPlatformProperties()
.supports_global_application_menus;
if (can_use_global_menus && ShouldUseGlobalMenuBar()) {
if (!global_menu_bar_)
global_menu_bar_ = std::make_unique<GlobalMenuBarX11>(this);
if (global_menu_bar_->IsServerStarted()) {
Expand Down

0 comments on commit 3893f92

Please sign in to comment.