Bug 508727 - Context menu for calendar folders disappears when selecting move folder or copy folder on wayland
Summary: Context menu for calendar folders disappears when selecting move folder or co...
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (other bugs)
Version First Reported In: 6.5.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-25 18:04 UTC by Andreas Hurka
Modified: 2025-09-12 10:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.5.2
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Hurka 2025-08-25 18:04:31 UTC
SUMMARY
The context menu invoked by right clicking on a calendar folder closes once either the option copy folder or move folder is selected to open the next layer of the menu tree. This next layer can be observed appearing before both disappear together. It makes no difference whether the selection occurs by hovering with the mouse or navigating using arrow-keys.

With the menu disappearing, moving and copying folders seems inaccessible, requiring a change over to an X11 session. This only happens on Wayland.


STEPS TO REPRODUCE
1. Open KOrganizer in the Plasma Wayland session.
2. Right click a calendar or calendar folder, e.g. "Personal Calendar". By default in the bottom left corner.
3. Hover over / Navigate to "Move Folder" or "Copy Folder"

OBSERVED RESULT
The context menu disappears, as does the next layer of the menu tree which can be seen briefly.

EXPECTED RESULT
The original context menu as well as all further panels of the menu tree stay open until exited via selecting a leaf option or clicking outside the menu panels.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20250820
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1
Kernel Version: 6.16.1-1-default (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz
Memory: 16 GiB of RAM (15.3 GiB usable)
Graphics Processor: Intel® Iris® Xe Graphics


ADDITIONAL INFORMATION
-
Comment 1 Allen Winter 2025-08-27 15:14:38 UTC
as a test, can you try to run from a terminal:


export QT_QPA_PLATFORM=xcb kontact


if that works better than we can for sure say its something Wayland related. not that I have any idea how to fix wayland stuff in the kdepim source.
Comment 2 Andreas Hurka 2025-08-27 16:06:17 UTC
(In reply to Allen Winter from comment #1)

> export QT_QPA_PLATFORM=xcb kontact

Running

QT_QPA_PLATFORM=xcb kontact

or

QT_QPA_PLATFORM=xcb korganizer

results in the menus cascading properly. The issue does not occur with this var set to xcb.
Comment 3 Allen Winter 2025-08-27 20:15:10 UTC
ok then. we have a Wayland issue.

so far I don't have any ideas.  I can ask around.
Comment 4 Allen Winter 2025-08-30 19:37:35 UTC
I was all set to get working on a fix for this one, but I cannot reproduce with my Fedora 42 Wayland session
I mean , I don't see the bug regardless if QT_QPA_PLATFORM is set or not.

I'm testing with the  current KDE stack (frameworks, plasma, kdepim) built by hand (by me).  so could be something else fixed this along the way... no idea.

@Andreas:
I'll pause this one and let you try again after upgrading to KOrganizer version 6.5.0.  if it still happens with that version I'll take another look.
Comment 5 Andreas Hurka 2025-09-11 15:11:44 UTC
(In reply to Allen Winter from comment #4)
> @Andreas:
> I'll pause this one and let you try again after upgrading to KOrganizer
> version 6.5.0.  if it still happens with that version I'll take another look.

Thank you for taking the time and sorry for only replying now.
Thing is, I already am on KOrganizer 6.5.0 (2025.08.0), as noted in the "Version First Reported In"-field. I seemingly neglected to list this under the Software Versions section, my bad.

According to KOrganizer, these are the Component versions I currently use, with the issue still present:
KOrganizer: 6.5.0 (25.08.0)
KDE Frameworks: 6.17.0
Qt: Using 6.9.2 and built against 6.9.2
openSUSE Tumbleweed (Wayland)
Build ABI: x86_64-little_endian-lp64
Kernel: linux 6.16.3-1-default

If need be I'll try building KOrganizer from source.
Comment 6 Allen Winter 2025-09-11 18:17:45 UTC
could you test the patch at https://invent.kde.org/pim/akonadi/-/merge_requests/275
Comment 7 Andreas Hurka 2025-09-11 23:52:54 UTC
(In reply to Allen Winter from comment #6)
> could you test the patch at
> https://invent.kde.org/pim/akonadi/-/merge_requests/275

Yes, that fixes it. The context menus are cascading without issue with that patch.
Comment 8 Allen Winter 2025-09-12 10:17:23 UTC
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 485661


(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