Bug 494193 - Panel popups position broken when PlasmaCore.Types.NoBackground is applied to the panel
Summary: Panel popups position broken when PlasmaCore.Types.NoBackground is applied to...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-06 04:08 UTC by Luis Bocanegra
Modified: 2024-10-15 18:39 UTC (History)
2 users (show)

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


Attachments
dialogs incorrect position on transparent panels (1013.08 KB, image/png)
2024-10-06 04:08 UTC, Luis Bocanegra
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luis Bocanegra 2024-10-06 04:08:06 UTC
Created attachment 174473 [details]
dialogs incorrect position on transparent panels

SUMMARY

Making panels fully transparent after "Popups now align with the panel mask" https://invent.kde.org/plasma/libplasma/-/merge_requests/1148 part of https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4451 breaks positioning of popups.

Setting PlasmaCore.Types.NoBackground to the panel containmentItem by using either https://github.com/sanjay-kr-commit/panelTransparencyToggleForPlasma6 or https://github.com/luisbocanegra/plasma-panel-colorizer first one recommended as mine does more things that are unrelated to this issue.

Results in the panel creating an empty mask https://github.com/KDE/plasma-workspace/blob/c809de7c72dcc7e94eeed5a0b09cb81f5512c2e0/shell/panelview.cpp#L1363C1-L1366C28

```cpp
void PanelView::updateMask()
{
...
    if (m_backgroundHints == Plasma::Types::NoBackground) {
        KWindowEffects::enableBlurBehind(this, false);
        KWindowEffects::enableBackgroundContrast(this, false);
        setMask(QRegion()); // <- this line
```

Which successfully removes the blur and contrast (allowing the panel to be fully transparent) **but breaks the positioning of popups**.


STEPS TO REPRODUCE
1.  Install https://github.com/sanjay-kr-commit/panelTransparencyToggleForPlasma6 KDE Store url is https://store.kde.org/p/2107649
2. Add it to a panel to make it transparent
3. Expand or hover on widgets

OBSERVED RESULT

Dialogs and tooltips on the left/top of the screen appear over the panel

EXPECTED RESULT

Dialogs and tooltips appear below/next to the panel instead of above it

SOFTWARE/OS VERSIONS

Operating System: Arch Linux 
KDE Plasma Version: 6.2.80
KDE Frameworks Version: 6.7.0
Qt Version: 6.7.3
Kernel Version: 6.11.1-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × Intel® Core™ i7-9750H CPU @ 2.60GHz
Memory: 31.2 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630

ADDITIONAL INFORMATION

None
Comment 1 Bug Janitor Service 2024-10-06 04:38:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4797