Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/NotifyIconWpf/TaskbarIcon.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// hardcodet.net NotifyIcon for WPF
// hardcodet.net NotifyIcon for WPF
// Copyright (c) 2009 - 2022 Philipp Sumi. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
// Contact and Information: http://www.hardcodet.net
Expand Down Expand Up @@ -783,6 +783,9 @@ private void ShowContextMenu(Point cursorPosition)
// fallback, the context menu can't receive keyboard events - should not happen though
WinApi.SetForegroundWindow(handle);

// set also the focus to the context menu, so that the keyboard works (using ESC if mouse is not over context menu).
ContextMenu.Focus();

// bubble event
RaiseTrayContextMenuOpenEvent();
}
Expand Down