Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.13.0, 5.14.0, 5.14.1
-
None
Description
When a MainWindow application that is out of focus is right click selected such that a context menu is created, then it is impossible to focus the MainWindow application (qApp->focusWindow() and qApp->focusWidget() are both nullptr). You can regain focus by focusing out of the MainWindow and left click the MainWindow. You can also left click the title bar of the MainWindow.
This was originally reported and diagnosed on the KeePassXC application on macOS 10.14 and 10.15. The original report is available here: https://github.com/keepassxreboot/keepassxc/issues/3412
Steps to reproduce:
- Have focus on a widget prior to switching to another application
- Right click select a different widget in the original application, the MainWindow will NOT receive focus.
- Attempt to focus the MainWindow (except clicking the title bar) while the context menu is still open, the app gets into a state where focus cannot be gained.
- This is immediately fixed if you focus another application then focus the original app again by left click anywhere OR left click the title bar when the context menu is open.
Start of broken state:
App in foreground but doesn't have focus:
Normally focused app: