fix: do not use CONTEXT_MENU flag for tray menu (#23843)
This commit is contained in:
parent
4133c71105
commit
b809d104d0
2 changed files with 6 additions and 40 deletions
|
@ -14,7 +14,6 @@
|
|||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/win/scoped_gdi_object.h"
|
||||
#include "shell/browser/ui/tray_icon.h"
|
||||
#include "shell/browser/ui/win/notify_icon_host.h"
|
||||
|
@ -25,8 +24,7 @@ class Point;
|
|||
|
||||
namespace views {
|
||||
class MenuRunner;
|
||||
class Widget;
|
||||
} // namespace views
|
||||
}
|
||||
|
||||
namespace electron {
|
||||
|
||||
|
@ -75,7 +73,6 @@ class NotifyIcon : public TrayIcon {
|
|||
|
||||
private:
|
||||
void InitIconData(NOTIFYICONDATA* icon_data);
|
||||
void OnContextMenuClosed();
|
||||
|
||||
// The tray that owns us. Weak.
|
||||
NotifyIconHost* host_;
|
||||
|
@ -104,12 +101,6 @@ class NotifyIcon : public TrayIcon {
|
|||
// Context menu associated with this icon (if any).
|
||||
std::unique_ptr<views::MenuRunner> menu_runner_;
|
||||
|
||||
// Temporary widget for the context menu, needed for keyboard event capture.
|
||||
std::unique_ptr<views::Widget> widget_;
|
||||
|
||||
// WeakPtrFactory for CloseClosure safety.
|
||||
base::WeakPtrFactory<NotifyIcon> weak_factory_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(NotifyIcon);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue