Hi Dominik,
In order to reproduce this one, auto-save changes should be disabled and lock workspace on minimize enabled.
When KeePass window is open and there are unsaved changes in the database, pressing Win+D to minimize all apps and show desktop fails to minimize some or all other application windows depending on the order in which Windows Explorer synchronously broadcasts WM_SYSCOMMAND + SC_MINIMIZE.
Worse, the modal Save Changes dialog sometimes gets minimized itself or ends at the bottom of Z-order so it's not immediatelly obvious why desktop is not showing.
Finally, after Save Changes dialog is dismissed other app windows minimize abruptly when the queue is unblocked.
Root cause is most likely a synchronous dialog box called directly from a window procedure thread (and windows explorer using SendMessage instead of PostMessage or SendMessageTimeout or SendNiotifyMessage). Regardless, you should not block the message pump for any reason on any thread that pumps messages or any shell broadcast will fail not just minimize to desktop.
Regards,
Igor Levicki
Forgot to add -- if locking the workspace with unsaved changes isn't possible for some reason I think you still shouldn't throw a popup since user has asked for a clear desktop and popup will steal the focus. I suggest letting the app minimize unlocked, defer the prompt for when window is restored, and use a system notification toast to notify user that workspace is unsaved and unlocked and allow them to click on it to resolve it right away or ignore it.
In my opinion, the proper solution would be Windows sending the minimization messages in a non-blocking/asynchronous way.
However, I could imagine implementing what you suggested as a workaround for this Windows problem, thus I'm moving this to the open feature requests.
Thanks and best regards,
Dominik
Ticket moved from /p/keepass/bugs/2435/