It is impossible to close the KMail window second time. My setup is that kmail starts minimized to tray. And when I close window, it normally is still working in tray. However, after upgrade to kde-unstable (I am on Arch, kmail package is 24.01.80-3), it behaves wrong. STEPS TO REPRODUCE 0. Configure KMail so it can be closed to tray. 1. Start Kmail (may be autostarted at login) 2. Click the tray icon to show main window. 3. Close the window. The window closes and the tray icon still shown (as expected). 4. Click the tray icon again to show main window. 5. Try to close window now. OBSERVED RESULT There is no reaction on close button. You can press Ctrl Q or just kill the window with Ctrl + Meta + Esc, but then the application terminates (no more tray icon). EXPECTED RESULT The window should be closed normally, and the app should continue working in tray. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.90.0 KDE Frameworks Version: 5.246.0 Qt Version: 6.6.1 Kernel Version: 6.6.7-arch1-1 (64-bit) Graphics Platform: Wayland Additional info: After killing the window, relaunching kmail shows the message that it failed to start. Second start however normally start the kmail. And then the bug of unclosable window can be reproduced.
Thank you for your report! I can replicate the bug on the latest unstable kde neon with kmail version 5.240.85 beta 2.
I see this with Ruqola too. Presumably an issue with KStatusNotifierItem
*** Bug 478776 has been marked as a duplicate of this bug. ***
Looks like a Qt bug: https://bugreports.qt.io/browse/QTBUG-120316
I have found a good workaround. To keep the window "closable to tray", you can "close to tray" it by clicking on the tray icon. This works at least for Kmail.
With bug 443129 fixed, we now can use another convenience hack - make the window unclosable. So we do not close it with button by accident.
*** Bug 481135 has been marked as a duplicate of this bug. ***
https://invent.kde.org/frameworks/kstatusnotifieritem/-/merge_requests/11 works around this