SUMMARY In KF5, when the system tray icon is enabled in KMail, closing the window with Alt+F4 or with the X button on the title bar used to close the window, leaving only the system tray icon. However, with KF6 version of KMail, this only happens a few times (often only once) after the application has been launched. After that, closing the window minimizes it instead, leaving it on the task bar. When this starts to happen, there's no way to restore the correct behaviour except quitting KMail altogether (using the File/Quit menu entry). This doesn't seem to happen if closing the window by clicking on the KMail icon in the system tray. When the behaviour described above starts happening, clicking on the KMail icon in the system tray shows the window again, but it forget its maximized state. This doesn't happen when restoring it by clicking on the corresponding entry in the task. STEPS TO REPRODUCE 1. Launch KMail and ensure that the "enable system tray icon" option is checked 2. Close the KMail window using the X button on the title bar or the Alt+F4 shortcut. It may be necessary to display the window and repeat this a couple of times to trigger the bug OBSERVED RESULT KMail window is minimized and still visible in the task bar. When clicking on the system tray icon to show it again, the window is not maximized, even if it was maximized when I closed it EXPECTED RESULT KMail window gets closed and it disappear from the task bar. When clicking on its system tray icon, KMail window is restored keeping the previous maximized state. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Gentoo Linux KDE Plasma Version: 5.93.0 KDE Frameworks Version: 5.249.0 Qt Version: 6.6.1 ADDITIONAL INFORMATION Gentoo doesn't provide official packages for the KF6 version of KDE Gear, so I installed them using the Gentoo KDE overlay
*** This bug has been marked as a duplicate of bug 478734 ***