Bug 494193

Summary: Panel popups position broken when PlasmaCore.Types.NoBackground is applied to the panel
Product: [Plasma] plasmashell Reporter: Luis Bocanegra <luisbocanegra17b>
Component: PanelAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: nate, niccolo.venerandi
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 6.2.2
Sentry Crash Report:
Attachments: dialogs incorrect position on transparent panels

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