Details
Details
- Reviewers
davidedmundson - Group Reviewers
Plasma - Commits
- R120:90466f3cd655: Fix Klipper popup opening on default screen instead of at cursor position
Diff Detail
Diff Detail
- Repository
- R120 Plasma Workspace
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Comment Actions
Code in system tray is quite good:
if (QScreen *screen = appletInterface->window()->screen()) { const QRect geo = screen->availableGeometry(); pos = QPoint(qBound(geo.left(), (int)pos.x(), geo.right() - desktopMenu->width()), qBound(geo.top(), (int)pos.y(), geo.bottom() - desktopMenu->height())); }
it binds it to the availableGeometry so it always appears outside of struts (panels)
Comment Actions
I dont think this is valid under wayland. QScreen::availableGeometry() returns only the QScreen::geometry() under wayland.
The method I think plasma introduced to know the available screen space through qml is:
AppletInterface::availableScreenRect or availableScreenRegion
and for c++ side:
Plasma::Corona::availableScreenRect
Plasma::Corona::availableScreenRegion
Comment Actions
I've figured extra adjustments are not necessary at all, QMenu::popup does enough already.
Screencast: https://streamable.com/jonoj