| Summary: | Double View::contextMenuAboutToShow signals when using keyboard 'Menu' button if QEventLoop::exec is called | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-ktexteditor | Reporter: | ulterno |
| Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | REPORTED --- | ||
| Severity: | normal | CC: | christoph |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
ulterno
2025-05-15 12:36:36 UTC
Using guidance by Igor Kushnir, I see contextMenuEvent being called twice, in case the 'Menu' key is used. The QContextMenuEvent in this case, has different addresses. The resulting QMenu pointer for the KTextEditor::View::contextMenuAboutToShow signal ends up being the same due to KTextEditor::ViewPrivate::contextMenu() using the KXMLGUIFactory We could block that until aboutToHideContextMenu is triggered. That should work since we don't open another context menu on right click when one is already open (unlike Microsoft things). It might be good if we could find out why that happens in case of Wayland and not X11. Maybe one can try checking with something other than KWin? Has somebody time to test that and provide a patch? This seems to have been fixed by KTextEditor 6.20.0 Tested when trying Bug 503813 and using https://invent.kde.org/ulterno/UsingKTextEditor/-/tree/minimal Can anyone confirm? ___ Operating System: EndeavourOS KDE Plasma Version: 6.5.3 KDE Frameworks Version: 6.20.0 Qt Version: 6.10.0 Kernel Version: 6.17.8-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor Memory: 64 GiB of RAM (62.7 GiB usable) Graphics Processor: AMD Radeon RX 7600 |