Created attachment 128331 [details] screenshot STEPS TO REPRODUCE 1. open kmail 2. right-click on its systray icon 3. dismiss the context menu of systray icon 4. right-click on the systray icon of kmail again OBSERVED RESULT misplaced context menu, see the attached screenshot please. EXPECTED RESULT context menu should always open in correct position SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.18.80 KDE Frameworks Version: 5.70.0 Qt Version: 5.14.2
KMail menu fully reloads on each show. All actions are removed and added again. For a short moment it has twice as much items. In that moment size of the menu is twice as big and as a results is wrongly positioned. Regression introduced in fix for Bug 399975.
A possibly relevant merge request was started @ https://invent.kde.org/pim/kmail/-/merge_requests/1
Fix submitted as https://invent.kde.org/pim/kmail/-/merge_requests/1
Jonathan, thank you for the fix, it will definitely help for KMail, but this is a bigger problem. There is a regression introduced in: https://phabricator.kde.org/D16297 That change is needed, but introduces new problems. I will try to investigate it further.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/111
Git commit ad286a0a61dabe9b7604385d04e6c58710375a04 by Jonathan Marten. Committed on 22/06/2020 at 07:08. Pushed by mlaurent into branch 'master'. Do not clear and recreate the system tray popup menu every time Just update the "New Messages In" submenu, or disable it if there are no new messages. Avoids the menu popping up at the wrong screen position. M +21 -16 src/kmsystemtray.cpp M +1 -0 src/kmsystemtray.h https://invent.kde.org/pim/kmail/commit/ad286a0a61dabe9b7604385d04e6c58710375a04
Git commit c3254912ea916bf3cc6b215e196f41a61d764e82 by Konrad Materka. Committed on 29/06/2020 at 18:30. Pushed by kmaterka into branch 'master'. [applets/systemtray] Fix context menu misplaced For SNI icons menu is imported from DBus. If during import it is changed, for example some actions added or replaced, new actions are added, but old one are only marked for removal in next event loop run. As a result menu size is too big until delereLater takes effect. Queue connection, so that Qt will have a chance to delete menu entires before menu is used. FIXED-IN: 5.20 M +2 -1 dataengines/statusnotifieritem/statusnotifieritemjob.cpp https://invent.kde.org/plasma/plasma-workspace/commit/c3254912ea916bf3cc6b215e196f41a61d764e82
*** Bug 423603 has been marked as a duplicate of this bug. ***
Git commit a409b06bbfb0ea10959d9f680ea1ef16e7b7827a by Konrad Materka. Committed on 30/06/2020 at 08:25. Pushed by kmaterka into branch 'Plasma/5.18'. [applets/systemtray] Fix context menu misplaced For SNI icons menu is imported from DBus. If during import it is changed, for example some actions added or replaced, new actions are added, but old one are only marked for removal in next event loop run. As a result menu size is too big until delereLater takes effect. Queue connection, so that Qt will have a chance to delete menu entires before menu is used. FIXED-IN: 5.18.6 M +2 -1 dataengines/statusnotifieritem/statusnotifieritemjob.cpp https://invent.kde.org/plasma/plasma-workspace/commit/a409b06bbfb0ea10959d9f680ea1ef16e7b7827a
Git commit 35ae7712d40a937e6e03e88376e5a1436ebdf60e by Konrad Materka. Committed on 30/06/2020 at 08:26. Pushed by kmaterka into branch 'Plasma/5.19'. [applets/systemtray] Fix context menu misplaced For SNI icons menu is imported from DBus. If during import it is changed, for example some actions added or replaced, new actions are added, but old one are only marked for removal in next event loop run. As a result menu size is too big until delereLater takes effect. Queue connection, so that Qt will have a chance to delete menu entires before menu is used. FIXED-IN: 5.19.3 M +2 -1 dataengines/statusnotifieritem/statusnotifieritemjob.cpp https://invent.kde.org/plasma/plasma-workspace/commit/35ae7712d40a937e6e03e88376e5a1436ebdf60e