Skip to content

Commit

Permalink
fix: recentDocuments on macOS not working
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Apr 26, 2024
1 parent b41da15 commit 40bd778
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions shell/browser/ui/cocoa/electron_menu_controller.h
Expand Up @@ -26,8 +26,6 @@ class ElectronMenuModel;
@protected
base::WeakPtr<electron::ElectronMenuModel> model_;
NSMenu* __strong menu_;
NSMenuItem* __strong recentDocumentsMenuItem_;
NSMenu* __strong recentDocumentsMenuSwap_;
BOOL isMenuOpen_;
BOOL useDefaultAccelerator_;
base::OnceClosure closeCallback;
Expand Down
4 changes: 4 additions & 0 deletions shell/browser/ui/cocoa/electron_menu_controller.mm
Expand Up @@ -31,10 +31,14 @@

namespace {

static NSMenuItem* __strong recentDocumentsMenuItem_;
static NSMenu* __strong recentDocumentsMenuSwap_;

struct Role {
SEL selector;
const char* role;
};

Role kRolesMap[] = {
{@selector(orderFrontStandardAboutPanel:), "about"},
{@selector(hide:), "hide"},
Expand Down

0 comments on commit 40bd778

Please sign in to comment.