Bug 377893 - FrameSVG - mask() returns empty reqion when it shouldnt
Summary: FrameSVG - mask() returns empty reqion when it shouldnt
Status: RESOLVED FIXED
Alias: None
Product: libplasma
Classification: Frameworks and Libraries
Component: libplasma (other bugs)
Version First Reported In: 5.32.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-21 18:26 UTC by Michail Vourlakos
Modified: 2017-03-22 13:11 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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