-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
This issue has been moved from a ticket on Developer Community.
When the MainWindow's LostKeyboardFocus event is triggered in my WPF (bridge) app, i.e. when the user clicks the mouse outside my app, the MainWindow will be hidden with Hide() in the LostKeyboardFocus handler. If the user clicks the app icon in the taskbar another time, the new app instance sends a message to the already existing MainWindow, whereupon it shows itself again with Show(). The new app instance will then be closed.
Unfortunately, under Windows 11, when the MainWindow is displayed again, the LostKeyboardFocus event is no longer triggered if the user clicks outside the MainWindow. However, under Windows 8.1 and under Windows 10, the LostKeyboardFocus event is triggered. Under Windows 11, only when the user clicks inside the app and then outside the app, the LostKeyboardFocus event is triggered and the MainWindow can be hidden again.
I asked in the developer forum, but there the problem could not be reproduced. [https://docs.microsoft.com/en-us/answers/questions/746213/missing-lostkeyboardfocus-event-in-windows-11.html] ()
Sample project: https://1drv.ms/u/s!AnJkahC5qjfigQTcZXXX36fj8ah9
Original Comments
Feedback Bot on 2/28/2022, 10:46 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Original Solutions
(no solutions)