Summary: | Kmail popup windows closes when trying to copy or move message to folder | ||
---|---|---|---|
Product: | [Applications] kmail2 | Reporter: | Gerald <gerald.drissner> |
Component: | UI | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | achimxm369, adam, barryvdean, benjarobin+kde, bjb01234, bugs.kde.org, christophe, chwallac, colin.thomson, correlander, david.decos, davispuh, dtombaugh, fischer, heri+kde, jlp, jranke, kaeslaek, luisfe, natesitton80, nicolas.fella, pericam, personal, rnbzilla, rob.dyck, roland.brand, senf, timfolger, todd.lasman, tommy.glading, winter, zvrabec001 |
Priority: | VHI | ||
Version First Reported In: | 6.0.2 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/pim/akonadi/-/commit/9738f63da4174c9d8b6abee328e15b3f5cd94cd6 | Version Fixed In: | 6.5.2 |
Sentry Crash Report: |
Description
Gerald
2024-04-17 06:42:03 UTC
Happens with me as well. Also when trying to move a message between folders: the menu disappears as soon as I try to move below the Recent Folder item. plasma 6.0.5 frameworks 6.3.0 QT 6.7.1 In other words, not fixed plasma 6.0.5 frameworks 6.3.0 QT 6.7.1 In other words, not fixed plasma 6.0.5 frameworks 6.3.0 QT 6.7.1 In other words, not fixed This bug is still there in kmail 6.1.2, frameworks 6.3.0. It's really frustrating. I have messages in folders I can't move or copy because of this. Still exists in Plasma6.1.4 and applications 24.8.0. Side note Dragging a message to a folder works. It;s just a problem with the secondary menu. Also seeing this with the menu, as mentioned in comment #6 it works fine when dragging the messages. Operating System: Fedora Linux 40 KDE Gear 24.08.0-1 KDE Plasma Version: 6.1.4 KDE Frameworks Version: 6.5.0 Qt Version: 6.7.2 Kernel Version: 6.10.7-200.fc40.x86_64 (64-bit) Graphics Platform: Wayland This bug makes kmail extremely clunky to use and is new in Plasma 6. This behaviour is observed both when right clicking on a message and trying to get to a folder to copy or move to, or by starting from the menus in the menu bar -- Message -> Copy or Move Message To ... -> Anything in the folder list Operating System: Gentoo KDE Gear 24.05.2 KDE Plasma Version: 6.1.4 KDE Frameworks Version: 6.5.0 Qt Version: 6.7.2 Kernel Version: 6.10.7-gentoo-x86_64 Graphics Platform: Wayland Since 24.08.1 it's got worse. Now I can't even use any of the Move Message To or Copy Message To entries, the menu just disappears as soon as the mouse is moved over these items. Previously at least the recently used folders items were accessible. Qt 6.7.2, frameworks 6.6.0, plasma 6.2.0. (In reply to Roger Noble from comment #9) > Since 24.08.1 it's got worse. Now I can't even use any of the Move Message > To or Copy Message To entries, the menu just disappears as soon as the mouse > is moved over these items. Previously at least the recently used folders > items were accessible. Qt 6.7.2, frameworks 6.6.0, plasma 6.2.0. I am seeing the same here with 24.08.2 Can confirm the problem with Fedora Linux 40: KMail 24.08.2 Qt 6.7.2 KDE Frameworks 6.7.0 (In reply to adam from comment #8) > This bug makes kmail extremely clunky to use and is new in Plasma 6. > > This behaviour is observed both when right clicking on a message and trying > to get to a folder to copy or move to, or by starting from the menus in the > menu bar -- Message -> Copy or Move Message To ... -> Anything in the folder > list > > Operating System: Gentoo > KDE Gear 24.05.2 > KDE Plasma Version: 6.1.4 > KDE Frameworks Version: 6.5.0 > Qt Version: 6.7.2 > Kernel Version: 6.10.7-gentoo-x86_64 > Graphics Platform: Wayland Still occurring with KMail 24.08.1, QT 6.7.2, and KDE Frameworks 6.6.0 (and newer according to other comments here) *** Bug 495833 has been marked as a duplicate of this bug. *** (In reply to Roger Noble from comment #9) > Seit dem 24.08.1 ist es noch schlimmer geworden. Jetzt kann ich nicht einmal > mehr die Einträge „Nachricht verschieben nach“ oder „Nachricht kopieren > nach“ verwenden, das Menü verschwindet einfach, sobald die Maus über diese > Elemente bewegt wird. Zuvor waren zumindest die Elemente der zuletzt > verwendeten Ordner zugänglich. Qt 6.7.2, Frameworks 6.6.0, Plasma 6.2.0. So ist es bei mir auch. Dann sollte sich schnell was ändern. Ich finde es schade! FWIW, I still see this issue with Gear 24.11.80 beta with plasma and frameworks from git. It only seems to be the "copy to" and "move to" options in every window, msg list, mail body, folder list etc. I tested "copy to and move to" in other applications and it works as it should. Operating System: Fedora Linux 41 KDE Plasma Version: 6.2.80 KDE Frameworks Version: 6.9.0 Qt Version: 6.8.0 Kernel Version: 6.11.10-300.fc41.x86_64 (64-bit) Graphics Platform: Wayland The issue seems to be related to the Wayland graphics platform. I switched back to X11, and moving messages works fine. Operating System: Debian GNU/Linux 12 KDE Plasma Version: 6.2.4 KDE Frameworks Version: 6.8.0 Qt Version: 6.7.2 Kernel Version: 6.11.10-amd64 (64-bit) Graphics Platform: X11 (In reply to Roland Brand from comment #16) > The issue seems to be related to the Wayland graphics platform. I switched > back to X11, and moving messages works fine. I can confirm this. There is no need to switch back to X11 for everything. Launching KMail the following way does the same trick: QT_QPA_PLATFORM=xcb /usr/bin/kmail See also: https://community.kde.org/KWin/Wayland#Forcing_KDE_apps_to_run_as_X11 (In reply to Thomas Fischer from comment #17) > I can confirm this. There is no need to switch back to X11 for everything. > Launching KMail the following way does the same trick: > QT_QPA_PLATFORM=xcb /usr/bin/kmail Thanks for this, QT_QPA_PLATFORM=xcb /usr/bin/kontact works for me. I wonder if the "product" should be moved to wayland? Operating System: Fedora Linux 41 KDE Gear 24.12.0-1 KDE Plasma Version: 6.2.80 KDE Frameworks Version: 6.10.0 Qt Version: 6.9.0 Kernel Version: 6.12.6-200.fc41.x86_64 (64-bit) Graphics Platform: Wayland *** Bug 498617 has been marked as a duplicate of this bug. *** *** Bug 499323 has been marked as a duplicate of this bug. *** This is related to the lines https://invent.kde.org/pim/akonadi/-/blob/master/src/widgets/standardactionmanager.cpp#L489 If I remove the delete menu; menu = new QMenu(); then it doesn't close *** Bug 495943 has been marked as a duplicate of this bug. *** *** Bug 500689 has been marked as a duplicate of this bug. *** *** Bug 501421 has been marked as a duplicate of this bug. *** Also still seeing this issue with: Operating System: Fedora Linux 41 KDE Plasma Version: 6.3.2 KDE Frameworks Version: 6.11.0 Qt Version: 6.8.2 Kernel Version: 6.13.5-200.fc41.x86_64 (64-bit) Graphics Platform: Wayland Starting kmail with "QT_QPA_PLATFORM=xcb kmail" makes it work but I see a black flicker for a split second the first time the menu opens. Not all the time so hard to capture. *** Bug 502183 has been marked as a duplicate of this bug. *** *** Bug 503876 has been marked as a duplicate of this bug. *** Still issue in the latest ArchLinux versions. Still an issue after updating to Plasma 6.4 *** Bug 506594 has been marked as a duplicate of this bug. *** I think that this is related but I am unsure of how to test. You also can move mail using using the Filter Rules option "Move Into Folder". When I attempted to set a filter like this, the filter ran for a few seconds and did nothing. Attempting to use the filter again resulted in nothing happening on the computer. (In reply to Colin J Thomson from comment #18) > (In reply to Thomas Fischer from comment #17) > > I can confirm this. There is no need to switch back to X11 for everything. > > Launching KMail the following way does the same trick: > > QT_QPA_PLATFORM=xcb /usr/bin/kmail > > Thanks for this, QT_QPA_PLATFORM=xcb /usr/bin/kontact works for me. > I wonder if the "product" should be moved to wayland? > > Operating System: Fedora Linux 41 > KDE Gear 24.12.0-1 > KDE Plasma Version: 6.2.80 > KDE Frameworks Version: 6.10.0 > Qt Version: 6.9.0 > Kernel Version: 6.12.6-200.fc41.x86_64 (64-bit) > Graphics Platform: Wayland I did this workaround for kontact and kmail now works as expected. Looks like a possible Wayland issue. *** Bug 508507 has been marked as a duplicate of this bug. *** Also affected: Operating System: Debian 13 KDE Plasma Version: 6.3.6 KDE Frameworks Version: 6.13.0 Qt Version: 6.8.2 Kernel Version: 6.12.38+deb13-amd64 (64-bit) Graphics Platform: Wayland I start to investigate this issue. Thank to @NicolasFella for the initial help! The root cause is in akonadi standardactionmanager.cpp, the function clipboardChanged() is called somehow when right-clicking and even when going over a menu. Which in turn generates the following call stack: - updateActions() - ActionStateManager::updateState() - ActionStateManager::enableAction() - enableAction() - delete menu. So when we go over a sub-menu, this delete the associated submenu (delete menu), which closes this submenu (which is normal since deleted)... Do now, the question is why, under Wayland, the function clipboardChanged() is called so often! For information, this issue (clipboard data changed event generated when opening a menu) can be reproduced with a very basic Qt project. So maybe a fix needs to occur in Qt. But right now, I have created a workaround, see: https://invent.kde.org/pim/akonadi/-/merge_requests/275 (In reply to Benjamin Robin from comment #36) > For information, this issue (clipboard data changed event generated when > opening a menu) can be reproduced with a very basic Qt project. So maybe a > fix needs to occur in Qt. Is there already a bug report against Qt? (I could not find anything obviously related on https://bugreports.qt.io/) Git commit 9738f63da4174c9d8b6abee328e15b3f5cd94cd6 by Allen Winter. Committed on 12/09/2025 at 10:17. Pushed by winterz into branch 'release/25.08'. widgets/standardactionmanager: Filter clipboard change events Under Wayland, QClipboard::changed signal is triggered very often, for example each time a QMenu is opened, or when the focus of the main window changed. This is an issue because Actions (and associated QMenu) are updated for various events, including the clipboard data change event. And when updating Actions, the QMenu are updated: old sub-menu is destroyed which close the sub-menu... To fix that only update the actions when the clipboard truly changed. Related: bug 508727 (cherry picked from commit 5c1aba602aa461dcf06dfe8b23f52df074b3f35c) Co-authored-by: Benjamin Robin <benjamin.robin@bootlin.com> M +1 -1 autotests/libs/actionstatemanagertest.cpp M +41 -32 src/core/pastehelper.cpp M +8 -0 src/core/pastehelper_p.h M +5 -2 src/widgets/actionstatemanager.cpp M +3 -1 src/widgets/actionstatemanager_p.h M +20 -6 src/widgets/standardactionmanager.cpp https://invent.kde.org/pim/akonadi/-/commit/9738f63da4174c9d8b6abee328e15b3f5cd94cd6 (In reply to Dennis Schridde from comment #37) > Is there already a bug report against Qt? (I could not find anything > obviously related on https://bugreports.qt.io/) I did not take the time to create the bug report. I need to investigate a bit. Maybe I will do it this weekend. Thanks for fixing this issue, which has also fixed the same problem in korganizer. |