Bug 442877 - Submenus of KStatusNotifierItem open to the wrong side
Summary: Submenus of KStatusNotifierItem open to the wrong side
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray widget (show other bugs)
Version: 5.22.5
Platform: Other Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks: 442187
  Show dependency treegraph
 
Reported: 2021-09-24 06:54 UTC by Alexander Reinholdt
Modified: 2025-01-16 15:07 UTC (History)
8 users (show)

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


Attachments
Test case: Simple AppIndicator3 in Python (1.08 KB, text/x-python)
2023-04-21 17:29 UTC, Luke Horwell
Details
Test case: QSystemTrayIcon in Python (PyQt6) (989 bytes, text/x-python)
2025-01-10 12:18 UTC, Luke Horwell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Reinholdt 2021-09-24 06:54:53 UTC
SUMMARY

When hovering over a submenu of KStatusNotifierItem's context menu the first time, very often the submenu is opened to the wrong side.

A user of Smb4K made a video showing this bug very nicely (see also bug report 442187): https://imgur.com/a/WGs2NP9

Besides Smb4K at least also Yakuake is affected by this bug (Height and Width submenus).  


STEPS TO REPRODUCE
1. Open the context menu of the status notifier item.
2. Hover over a submenu the first time.

OBSERVED RESULT

The submenu opens to the wrong side and, hence, cannot be seen and used. After moving away and hovering back over the submenu, it most of the time opens to the correct side.

EXPECTED RESULT

The submenu always opens to the correct side.

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Kernel Version: 5.14.2-1-MANJARO (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Comment 1 Luke Horwell 2023-04-21 17:29:01 UTC
Created attachment 158279 [details]
Test case: Simple AppIndicator3 in Python

Can confirm AppIndicator3 (GTK) and Ayatana Indicator tray icons are affected too. Both in single monitor and multiple monitor setups.

Attached is a simple test case to replicate this with a simple Python application. If necessary, replace "AppIndicator3" with "AyatanaAppIndicator3" depending on the Python implementation available for your distro (both APIs are compatible). I was writing this for a new bug report until I found this one, originally suspecting it was a GTK integration bug.
Comment 2 Jens Gwerder 2023-05-17 18:52:31 UTC
I can confirm this issue too, which I noticed with polychromatic.
I'm using Ayatana Indicator (v0.9.3-1).
Comment 3 Hamish Robertson 2024-03-26 09:38:49 UTC
This is still an issue in KStatusNotifierItem 6.0.0.
Comment 4 Hamish Robertson 2025-01-10 09:43:12 UTC
I believe this was fixed in Plasma 6.2 in October 2024.
Comment 5 Luke Horwell 2025-01-10 12:13:48 UTC
The bug is still present in Plasma 6.2.5. Using the Python test case (attachment), I can still reproduce the issue as described (menus open _initially_ to the wrong side).

Tested under:
Arch Linux
KDE Plasma 6.2.5
KDE Frameworks 6.9.0
Qt Version 6.8.1
X11

Does the test case work for you? If the issue was indeed fixed, please could you share details of your environment and the app? Additionally, if there were specific commits or changes that addressed this bug, I’d appreciate a reference to help verify - I couldn't see any specific commits.
Comment 6 Luke Horwell 2025-01-10 12:18:36 UTC
Created attachment 177256 [details]
Test case: QSystemTrayIcon in Python (PyQt6)

Here's another test case to demonstrate, using QSystemTrayIcon (Qt) via PyQt6.
Comment 7 Hamish Robertson 2025-01-16 09:40:36 UTC
Your PyQt6 works correctly for me.
I guess the difference is Wayland which I probably switched to at the same time as updating to Plasma 6.2.

Tested under:
Arch Linux 
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1
Kernel Version: 6.12.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 8 Marco Martin 2025-01-16 15:07:02 UTC
is the issue of the menu actually opening off-screen?