Bug 377893

Summary: FrameSVG - mask() returns empty reqion when it shouldnt
Product: [Frameworks and Libraries] libplasma Reporter: Michail Vourlakos <mvourlakos>
Component: libplasmaAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.32.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Michail Vourlakos 2017-03-21 18:26:19 UTC
Frameworks 5.32 broke the previous experience with mask() function from FrameSvg.
the code that follows especially during initialization returns an empty QRegion for fixedMask variable.

Is that intentional or is considered a bug? I used the following code to blur or mask a specific region for my window. From 5.32 this behavior is broke because mask() returns empty regions most of the time. 

--------------

if (!m_background) {
                m_background = new Plasma::FrameSvg(this);
                m_background->setImagePath(QStringLiteral("widgets/panel-background"));
}

m_background->setEnabledBorders(enabledBorders());
m_background->resizeFrame(size());
QRegion fixedMask = m_background->mask();
Comment 1 Michail Vourlakos 2017-03-21 18:32:14 UTC
in plasmashell this can be observed by the following:

use a theme that is using rounded corners, at !compositing state all panels and plasma windows do not have rounded corners any more...
Comment 2 Marco Martin 2017-03-22 12:12:12 UTC
I can confirm the problem
Comment 3 Marco Martin 2017-03-22 13:11:51 UTC
Git commit 088a79d131f7e192724978566e67b26b30632674 by Marco Martin.
Committed on 22/03/2017 at 13:11.
Pushed by mart into branch 'master'.

correct maskRequestedPrefix when no prefix is used

requestedprefix requires to not have the "-", don't fail anymore in
q->hasElementPrefix(frame->requestedPrefix) in
FrameSvgPrivate::generateBackground

M  +1    -1    src/plasma/framesvg.cpp

https://commits.kde.org/plasma-framework/088a79d131f7e192724978566e67b26b30632674