Version: (using KDE KDE 3.2.0) Installed from: Debian stable Packages Look at the following scenario: a) I have kmail main window running, *not* minimized, but hidden below some other windows - so invisible b) I see new mail indicator on the kmail notification icon in the desktop tray. c) So I click this indicator. d) And ... nothing happens (in fact, one can finally find that the kmail window just happened to be minimized, next click will bring it to the top) I get this very frequently and it is irritating, in fact it gives illusion that one need to use double-click to bring kmail window in contrary to the standard KDE behaviour. In my opinion clicking kmail notification icon in tray should do just one simple thing - bring the kmail window to the top on the current desk - whatever was it previous state. I see no reason for notification icon to be working as minimize button and this behaviour causes problems as described above.
And additional, related note: when I minimize kmail normally (using minimize icon), the program bar is visible on the panel. When I minimize it clicking dock icon, it is NOT. This is very confusing and innatural. And this is one more reason to resign from using dock icon as minimize button.
That's actually a bug.
To fix this, a tiny fix in kmail/kmsystray.cpp is required: In method void KMSystemTray::mousePressEvent(QMouseEvent *e) ignore the following case: if( mParentVisible && mainWindowIsOnCurrentDesktop() ) hideKMail(); (What remains in the left mouse button case is actually only showKMail() ) This results in exactly the behaviour Kasperski wants. I don't know if this helped. Since that report is already 4 months old I feel a little bit silly to post this ridiculous patch. But I wonder why this little annoying topic is still unresolved.
Created attachment 6720 [details] Patch to kmsytemtray I don't think ignoring if( mParentVisible && mainWindowIsOnCurrentDesktop() ) hideKMail(); is the right way to solve this problem because the mainwindow isn't minimzed any more than. In my opinion it's better to check if the window is active (has the focus). If not than it's hidden so it can brought to front (even if it isn't hidden the changes do no harm). The patch also checks if the window is minimized and brings it to front when clicking on the systray icon (this didn't work when the window isn't minimized to a systray icon, but to a disabled window on the systray)
also, if kmail use the systray icon, the regular minizime window should hide the application just like the icon do. so _ and X would do the same on icon mode.
My problem is this: KMail is on desktop #2 (minimized or not). When I click the mail notification on desktop #1, the icon disappears and reappears, that's it. I guess I should be taken to the right desktop (#2 in this case) and have KMail as active window? The only thing that changes is that KMail in the panel becomes light blue. So now I switch to #2 where KMail is minimized. I click the systray icon and KMail disappears from the panel! I click it again and KMail is the active window. I click it again, KMail disappears completely. I click it again, KMail is active window and the icon disappears! Now when I don't take a look at the new mail and another mail comes in, there will not be an icon in the systray to show it. My setting is to only show the systray icon on unread mails, and each virtual desktop panel only shows the windows of its desktop. So what I expect is: 1) If there is unread mail, there is always a systray icon to show it. 2) Wherever I am, clicking the systray icon takes me to an active KMail window 2a) on my desktop if KMail was "closed"=not in any panel 2b) or on another desktop if KMail is somewhere in the panel.
Can one not simply copy the code from e.g. kopete? Kopete brings to front when in beackground and minimizes when already in front.
*** Bug 84919 has been marked as a duplicate of this bug. ***
Extra note: it seems to me that kopete behaves well (tested on KDE 3.2.3): if I click kopete tray icon: - if kopete window is minimized, it is restored and bringed to top - if kopete window is restored but partially or completely hidden, it is bringed to top - if kopete window is completely visible, it is minimized So please just handle this click in kmail EXACTLY THE SAME WAY as it is handled in kopete.
i think code should not be copied from kopete to kmail, but be generalized to systray+window application. anyone tried noatun ? same problem... only few applications manualy fixed it.. like kopete. fixing it in kmail would not fix the real problem IMHO this should go further/lower just my two cents
The bug is still here in KMail from today CVS. KMail should work in the same way as Akregator does for example. Now it even happens that if you are quickly double or triple or more clicking on KMail icon in the system tray the icon just dissapears from the tray, but the application is still runing.
Created attachment 12342 [details] Patch to kmsytemtray I agree that the system tray behaviour should be generalized to systray+window application, but until that is done here is a patch that copies code from ksystemtray.cpp to implement the same behaviour. The patch is against Kmail 1.8.2 (KDE 3.4.2). I think Bug 105139 (http://bugs.kde.org/show_bug.cgi?id=105139) is a duplicate of this bug but with a better tittle. Kåre
*** Bug 105139 has been marked as a duplicate of this bug. ***
Other test case: * I use Akregator & Kmail in Kontact * I'm reading my news with Akregator * I see the new mail indicator on the kmail notification icon in the desktop tray * I click on it..... the window goes away :-( ... I just wanted to pen kontact in ¨kmail¨ mode
Hi! The last comment is probably more a Kontact problem but is I think it is still important to get a intuitive and standardized behavior. I have used my patch above since 3.4.2 and it works for me. This is the behavior after the patch when the tray icon is clicked: 1) If KMail is behind any other window, KMail is set on top. 2) If KMail is on top, the KMail window is hidden. 3) If KMail is on another desktop, the view is switched to that desktop and KMail is set on top. 4) If the KMail window is hidden, the window is restored on the current desktop not necessarily the same as it was hidden on. Number 4 in the list is the reason I made the patch. If KMail was hidden it would always force me back to the desktop I had hidden KMail on. Why hasn't this patch been applied? Is it because its "ugly" in duplicating code and a clean solution is wanted? Anyway I had to modify the patch somewhat for >= 3.5.0, so if there is interest I can post the new patch also. Kåre
I would really like to see 1-3, yet 4 IMO should not be implemented. I want kmail or kontact to stay on the desktop it was started, even if hidden, and the tray-icon to get me there. If people want to have kmail/kontact on all windows, set the window-properties to "show on all desktops".
This is not only my preference it's also about standard behavior. A quick check gave me this result: - JuK, Akregator, KMPlayer, AmaroK and KMix* follow my described 1-4 behavior (*KMix uses middle click). - KOrganizer breaks 3 by moving the window to the current desktop. - Noatune's behavior depends on what skin is in use. - KMail breaks 4 Shouldn't all applications behave the same and if different behavior is desired, it should be configurable either globally or per application?
I just installed the Kubuntu debs of kde 3.5.3 (and KMail). I thought I would give the "show on all desktops" a chance. Unfortunately when the KMail window is hidden and then restored the "show on all desktops" flag is cleared, so that is not an option.
Bug 89847 is probably duplicate of this one. Desktop swithing bug is still present in kmail 1.9.3 (KDE 3.5.3). From what I read there are four similar bugs/complaints: 1) Kmail & Kontact integration issues. 2) Kmail swithng to desktop where it was last minimized (quite an unconfortable behaviour). 3) Clicking tray first minimizes hidden but not minimized window, next click pops it up (clearly a Kmail bug, Amarok and Akregator do not suffer from this). 4) Clicking minimize button does not send kmail into tray (neither does Amarok and others, I do not thinks it is actually a bug). I wonder why all these usability bugs are so long unresolved.
"Kmail swithng to desktop where it was last minimized (quite an unconfortable behaviour)" - This is really uncomfortable for me too! Could it be changed, or, at least, an option added to control the way it behaves?
Maybe it would be possible to add a third option to the "System Tray Mode" that would say "Use Standard System Tray behaviour" that would make KMail use the systemtrays standard show/hide behaviour. (If anybody is interested I have patched my KMail to behave like the systemtrays default behaviour. I copied the code from the systemtray implementation.)
Kåre Särs: Sure I am interested, could you please attach the patch? What version of Kmail is it for? If it works there will be at least a chance distribution maintainers will accept it.
Created attachment 16717 [details] System tray behaviour patch for KMail in KDE 3.5.x Here's the patch for the interested. This patch makes KMail behave as I described in comment#15. I copied most of the code from ksystemtray.cpp (kde 3.4.2) I'v been using this patch since 3.4.2 (needed some modifications going to 3.5.x)
Kåre Särs: Thank you, works perfectly
Another one here - it works GREAT with 3.5.3! :) So I have another customized ebuild... ;)
Is there a reason this hasn't been imported into svn?
Wow, still the same irritating behavior on Kubunty 7.04 ... Any chance this will get applied someday?
See also bug 121673.
This is fixed in KDE4, it now works exactly like comment 9 describes it.
*** Bug 121673 has been marked as a duplicate of this bug. ***
*** Bug 89847 has been marked as a duplicate of this bug. ***
Are the problems 1+2* mentioned in comment 19 (but NOT in comment 9) fixed in KDE 4 too? If not, this bug should be reopened. This is especially important because two bug reports (89847 and 105139) regarding problem 2 were closed because they were taken as duplicates of this bug report. 89847 had been confirmed by popular vote. There is also a still related bug report open (118262). * Here is a short discription of 'problem 2' (quoted from 89847): After minimizing kmail to the systray, if I switch to another desktop and open kmail it forces a change to the desktop that kmail was minized on rather than opening on the current desktop.
>Are the problems 1+2* mentioned in comment 19 (but NOT in comment 9) fixed in KDE 4 too? If not, this bug should be reopened. Problem 2 is fixed, the KMail window opens on the desktop you are currently on. Problem 1 is not fixed, but there are other bug reports about unifing the system trays in Kontact, that should not belong to this bug report.
Could you take a look at the subject of this bug and the initial description? This bug was not about the behaviour in multi-desktop configuration, but about invalid behaviour when system trays are considered. So, as this problem is not solved, the bug should be reopened. If there is a better bug about this matter, mark it as duplicate, so it is clear where those votes should be moved.
.
I'd like to switch between kmail and akregator via system tray (see comment #14). In KDE 3/4, if Kmail is open a click on akregator in the system tray closes kmail, instead of opening akregator. Another click is needed.
I'm not sure what was the correct behaviour and why this was "resovled", but kmail from KDE 4.1 when opened from tray brings you to the desktop it was previously opened on. Since the bug http://bugs.kde.org/show_bug.cgi?id=89847 is marked as a duplicate of this one, this behaviour should be fixed as a part of resolving this one, right? Current behaviour is really really irritating :/
I've checked this with KMail from KDE SVN r881890 (to be in KDE 4.2). Clicking the tray icon still doesn't respond as expected.
Works for me in KDE 4.3
I'm not going to reopen the bug, but it definitely does not work as I would expect it should. The original description still describes the behavior I see in 4.3.x and 4.4 beta. (Kubuntu 9.10) Are there plans to move to the new systemtray API (or whatever it is called :)
well , i have a bug report that was marked as duplicate of this one. if this one isnt fixed , i will reopen my own bug report. when i click on the kmail system tray icon, it opens kmail in the last virtual desktop kmail was on. all other kde apps dont do this. they open in the virtual desktop *i am currently on* !!!! either change all other kde apps, make it a global option, or change kmail. but diferent systray icon clicking functionality from kmail to all other kde apps is not a solution. i will wait a day or two, if this continues to be marked fixed , i will reopen my bug. thanks :) merry xmas to all :)
Yes, reopen your original bug then. The original bug is surely fixed.
ok , just did. my original bug about kmail and systray clicking and virtual desktops just reopened. also i removed the duplicate setting.
(In reply to comment #42) > Yes, reopen your original bug then. The original bug is surely fixed. I beg to differ about the bug being fixed. I'm using KMail Version 1.13.0 (KDE 4.4 beta) in Kubuntu 9.10. I have "Always show KMail in systemtray" enabled and when I click the system tray icon I get the exact same behavior as the original bug reporter describes. If the behavior is not seen as a bug please set it to WONTFIX.
Ah, okay. I see. That bug is still there - must be very easy to fix. Setting as a junior-job.
Iori: What's that bug's number? I submitted a similar one: https://bugs.kde.org/show_bug.cgi?id=123532 and I guess it is a duplicate of yours, not of this one.
(In reply to comment #46) > Iori: What's that bug's number? > I submitted a similar one: https://bugs.kde.org/show_bug.cgi?id=123532 and I > guess it is a duplicate of yours, not of this one. mine is : https://bugs.kde.org/show_bug.cgi?id=105139
*** Bug 217397 has been marked as a duplicate of this bug. ***
*** Bug 242328 has been marked as a duplicate of this bug. ***
SVN commit 1200286 by tnyblom: Patch from George Metaxas, Thanks! This patch fixes bug 74938, which is related to the way in which the systray icon of KMail behaves. Currently, clicking on the systray icon has the effect of minimizing the KMail window, irrespective of its position in the window stack, and maximizing it if it was previously minimized. In the latter case, the current virtual desktop is changed to the virtual desktop where the KMail window was minimized. As noted in the corresponding bug entry, this behavior is different than the corresponding behavior of other KDE applications (e.g. Akregator). The patch modifies the behavior of the KMail systray clicking handling, by making it identical to other applications (e.g. Akregator). When the KMail window is the top level window in the virtual desktop, it is minimized. If it is visible in the desktop, but not at the top, it is brought to the top. If the window is minimized, then it is maximized to the current virtual desktop. BUG: 74938 M +26 -58 kmsystemtray.cpp M +0 -2 kmsystemtray.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1200286