Version: 1.5.9 (using KDE 3.1.9) Compiler: gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice) OS: Linux (i686) release 2.4.20-gentoo-r5 the style guidelines suggest that an application that displays a system tray icon should not close simply by closing the main window; instead it should simple hide the mainwindow and stay running. http://developer.kde.org/documentation/standards/kde/style/basics/systray.html
*** Bug 66874 has been marked as a duplicate of this bug. ***
Subject: Re: New: kmail system tray icon behaviour not standard On Saturday 30 August 2003 19:09, Gav Wood wrote: > the style guidelines suggest that an application that displays a > system tray icon should not close simply by closing the main window; > instead it should simple hide the mainwindow and stay running. That's correct. But if the user chooses the "Show system tray on new mail" mode then KMail's behavior on clicking the X button will be inconsistent/confusing because if there are no unread messages (and therefore no systray icon) then KMail would be terminated and if there are unread messages (and therefore also the systray icon) then KMail would just be hidden. I don't know whether that's a desirable behavior. If OTOH the user uses the "Always show system tray" mode then KMail should behave like the style guide says. I cc'ed kde-usability for advice how to proceed in the "Show system tray on new mail" case. Please send all replies also to the bug report (63480@bugs.kde.org). Regards, Ingo
Subject: Re: New: kmail system tray icon behaviour not standard Quoting Ingo Kl
*** Bug 69656 has been marked as a duplicate of this bug. ***
I favor minimizing to tray when close button is clicked and it has a system tray icon. If the user doesn't want it in the system tray, then closing exits. Sounds good to me.
I agree. I was going to report this as a wish/bug until I found this one. Being in the habit of clicking the close button in Thunderbird, the switch to Kontact is driving my wife crazy as she keeps exiting when she means to hide. If someone really wants to quit, they can do so from the File menu. Another, less desirable, option is to take the Windows approach of "dumb" users, and ask "Are you sure?" when the close button is clicked. Then the user could say 'no' and remember to click the tray icon.
Also, when bringing the kmail window back up from the systray, the window is coming up on the virtual desktop where it previously was shown instead of the desktop that I am currently working on. So, it drags me to the other desktop instead of just coming up.
Created attachment 5656 [details] Patch to fix tray icon behavior This patch adds the functionality described above. If the users does not use tray notifications, then the close button exits the program. If they use notifications on new mail only, then when they click close, it shows the icon and hides kmail. If they always show the tray icon, then it just hides kmail when they click on the close button. This would be a valuable thing to add to CVS, if the patch is acceptable.
Regarding comment #7: I actually consider that behaviour a *feature*. I always keep kmail running on virtual desktop 1, and I like that I can click on the tray icon and be taken to where it's running; I don't want it to pop up on whatever desktop I happen to be working on when the mail comes in. But this could just be me ...
The patch I submitted addresses the original issue (regarding clicking on the "close" button...) It seems to me that comment #7 would better be addressed by being logged as a separate bug (it *IS* a separate issue...)
> Patch to fix tray icon behavior It does work for me and it's ok. Thank you!
I was just trying to figure out whole the tray thing worked as well. And it's not like I'm a newbie or anything either. It just didn't make sense to me that to minimize to tray, I had to click the tray. All other KDE apps you click close to go to try. It should certainly follow the standards.
has anyone had a chance to review the patch and see if it can be committed?
Flagging patch so KMail devs will notice it
Actually I'm working on a new version of the patch that works with KMail and Kontact both. (My first patch only worked with KMail)
Well just to make it even better: I use the new "WindowMenu->Advanced->Special window settings" dialog to make kmail not appear on the taskbar. But now the minimize button does not work. I know that this is propably not a Kmail problem. There is normally also "nowhere" to minimize the window to when activated, but in this case it can go to the systray... so when configured to always show in the systray don't let it on the taskbar [It would be ok with me if a window with no taskbar entry would be minimized to nowhere as it is still accessible via alt+tab...]
Has this patch been included in the current KDE 3.3 ? I am using 3.3 via the Debian unstable packages right now but afaik Kmail is not yet updated so I can't see. Right now I wanted to report this (minimize to tray when pressing X, at least when "always show systray icon" is enabled) as a bug right now - hope it has been fixed though.
It works in the latest CVS, and it has since the beginning of June. I don't know if it was included in 3.3 though... It should be easy enough to backport, though.
"I favor minimizing to tray when close button is clicked and it has a system tray icon. If the user doesn't want it in the system tray, then closing exits. Sounds good to me." I don't like that at all. I like my windows to close when I click [X], not to put them into the systray. I like it when kmail shows new email there, but closing the main windows is synonymous with exiting the program - and it should stay so. The styleguide seems wrong to me (especially because 90% of all programs exit, but a few don't - that's inconsistent. The program should go to the systray if I _minimize_ it, not if I close it)
> "I favor minimizing to tray when close button is clicked and it has > a system tray icon. If the user doesn't want it in the system tray, then > closing exits. Sounds good to me." what people favour isn't really the point; the style guidelines are there for a reason, and this should stay as a bug until either: a patch is committed that fixes the tray behaviour. or the style guidelines are changed. > The program should go to the systray if I _minimize_ it, not if I close it) this, imo is an incorrect assumption (probably spread by windows' completely chaotic systray bahaviour). here's 2 quick rules to set out what (imho) the *kde* style guidelines are trying to get accross to the user/dev: 1. if an application has a tray icon, it "lives" there; a window closing should therefore never exit the app. 2. *applications* cannot be *minimised* wholesale; "minimisation" is a *window*-level operation. bish bosh, gav
I know it's been fixed in the latest CVS (becuase I fixed it...) I don't know if it was included in 3.3 (I had thought it had...) I just verified, and this is how it works (I'm running the latest CVS version - again, I don't know if it's been included into 3.3 - but I'm pretty sure that it has. If there is no tray icon notifications --> Close on clicking "X" If there are ALWAYS tray icon notifications --> Minimize to tray on clicking "X" Those both follow the style guide. The final option was kind of "made up" because there isn't really a defined way that it should work: If there are tray notifications ON NEW MAIL ONLY --> If the icon is not shown, show it and minimize to tray. Again, there aren't really guidelines for the last case - it was decided to use this behaviour based on postings the the mailing lists, comments on this bug, and discussions on #kontact. (This bug was fixed as a part of fixing the same issue within Kontact. If it's not working that way in current CVS, then I'd be interested in knowing about it... :) (If it is, then this bug should be closed.)
*** Bug has been marked as fixed ***.
Just to let everyone know - the behaviour as described above for CVS is exactly the same in the KDE 3.3 Final (using Debian unstable builds myself). I think first and second options are exactly as described in the guidelines (and make a lot of sense too), so I think they don't need to be discussed. Personally i think the third option (only systray when new mail) is resolved very well, too. This way the "enable systray icon" option decides if "X" closes the window or quits the application. This the guidelines are followed here to - KMail *has* a systray when the option is enabled, it's just not visible when no new mail is present. -> Everybody happy / spending my votes on other bugs :)