Bug 511188 - "Show alternatives..." popup opens partially out of the screen when there's no room to display it under the widget, and the widget is at or near the top of the screen
Summary: "Show alternatives..." popup opens partially out of the screen when there's n...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Containment (other bugs)
Version First Reported In: 6.5.0
Platform: Arch Linux Linux
: HI normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-27 00:39 UTC by Patrick Silva
Modified: 2026-01-05 17:07 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.5.5
Sentry Crash Report:


Attachments
screen recording (1.15 MB, video/webm)
2025-10-27 00:39 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2025-10-27 00:39:12 UTC
Created attachment 186212 [details]
screen recording

STEPS TO REPRODUCE
1. add System Monitor widget to desktop
2. right-click on the added widget and choose "Show alternatives..."
3. 

OBSERVED RESULT
As we can observe in the attached screen recording, sometimes "Show alternatives..." popup opens partially out of the screen. I can't reproduce consistently; possibly the bug depends on the position of the widget on the screen.

EXPECTED RESULT
the observed result should not occur

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.5.0
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Graphics Platform: Wayland
Comment 1 Nate Graham 2025-10-29 19:19:56 UTC
I can reproduce it, and I figured out the trigger: the Alternatives popup has to be so tall that there isn't room to display it below the widget (in terms of the Y axis, not the Z axis). In this case, it appears above the widget. If the widget is itself near or at the top of the screen, it appears partially or fully off the screen.

We should probably make it appear centered within the widget in this case, and also always bounded to within the screen area.
Comment 2 Nate Graham 2025-10-29 19:31:12 UTC
While investigating this, I also found two other related issues with the Alternatives popup for desktop widgets: Bug 511335, Bug 511336.
Comment 3 Bug Janitor Service 2026-01-05 00:12:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1416
Comment 4 Nate Graham 2026-01-05 17:05:43 UTC
Git commit d6204c682be269900490180402a2db484391a478 by Nate Graham, on behalf of Alexey Rochev.
Committed on 05/01/2026 at 17:05.
Pushed by ngraham into branch 'master'.

Dialog: if we already flipped it to appear below, shift it upwards instead
FIXED-IN: 6.5.5

M  +3    -1    src/plasmaquick/dialog.cpp

https://invent.kde.org/plasma/libplasma/-/commit/d6204c682be269900490180402a2db484391a478
Comment 5 Nate Graham 2026-01-05 17:07:00 UTC
Git commit c4e277b1d54723a624a4c627e54b6aeae8f1fb01 by Nate Graham.
Committed on 05/01/2026 at 17:06.
Pushed by ngraham into branch 'Plasma/6.5'.

Dialog: if we already flipped it to appear below, shift it upwards instead
FIXED-IN: 6.5.5


(cherry picked from commit d6204c682be269900490180402a2db484391a478)

e209684c Dialog: don't flip position to appear above parent if we already flipped it to...

Co-authored-by: Alexey Rochev <arochevdev@gmail.com>

M  +3    -1    src/plasmaquick/dialog.cpp

https://invent.kde.org/plasma/libplasma/-/commit/c4e277b1d54723a624a4c627e54b6aeae8f1fb01