Check context menu when calling popContextMenu API.
This commit is contained in:
parent
2eaaad610d
commit
613e5c77ea
1 changed files with 3 additions and 0 deletions
|
@ -162,6 +162,9 @@ void NotifyIcon::DisplayBalloon(const gfx::Image& icon,
|
|||
}
|
||||
|
||||
void NotifyIcon::PopContextMenu(const gfx::Point& pos) {
|
||||
// Returns if context menu isn't set.
|
||||
if (!menu_model_)
|
||||
return;
|
||||
// Set our window as the foreground window, so the context menu closes when
|
||||
// we click away from it.
|
||||
if (!SetForegroundWindow(window_))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue