Bug 335446 - Panel is not being blurred
Summary: Panel is not being blurred
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: master
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-27 23:52 UTC by Romário Rios
Modified: 2014-06-11 09:12 UTC (History)
3 users (show)

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


Attachments
no blur (16.52 KB, image/png)
2014-05-27 23:52 UTC, Romário Rios
Details
no blur toolbox (127.52 KB, image/png)
2014-05-28 10:35 UTC, Romário Rios
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Romário Rios 2014-05-27 23:52:16 UTC
Only the color filter is being applied to the background image. The blur filter isn't. You can see the difference between the calendar applet (blurred) and the panel (not blurred) in the attached screenshot.

Reproducible: Always

Actual Results:  
No blur

Expected Results:  
Should blur
Comment 1 Romário Rios 2014-05-27 23:52:39 UTC
Created attachment 86872 [details]
no blur
Comment 2 Marco Martin 2014-05-28 10:13:02 UTC
happens every startup?
try to resize slightly the panel, does the blur appear?

one interesting thing from the screenshot is that the popup dialog has correct blur, but the panel doesn't
Comment 3 Romário Rios 2014-05-28 10:35:11 UTC
(In reply to comment #2)
> happens every startup?
That seems to be the case.

> try to resize slightly the panel, does the blur appear?
Nope

> one interesting thing from the screenshot is that the popup dialog has
> correct blur, but the panel doesn't
Yep.

Here's another screenshot. The panel toolbox also doesn't have blur.
Comment 4 Romário Rios 2014-05-28 10:35:46 UTC
Created attachment 86876 [details]
no blur toolbox
Comment 5 David Edmundson 2014-05-28 14:07:45 UTC
I seem to be able to reproduce this.
Romanio, do you have kwin compositing when you start up?

XProp of panel:
_KDE_SLIDE(_KDE_SLIDE) = 0xffffffff, 0x3
_KDE_NET_WM_FRAME_STRUT(CARDINAL) = 0, 0, 0, 0
_NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 0, 0
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_NET_WM_STRUT(CARDINAL) = 0, 0, 0, 30
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 1919
_KDE_NET_WM_ACTIVITIES(STRING) = "00000000-0000-0000-0000-000000000000"
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_CHANGE_DESKTOP
_NET_WM_STATE(ATOM) = 
_NET_WM_USER_TIME(CARDINAL) = 17667532
_NET_WM_DESKTOP(CARDINAL) = 4294967295
_KDE_NET_WM_SHADOW(CARDINAL) = 10486086, 10486087, 10486088, 10486089, 10486090, 10486091, 10486092, 10486093, 12, 12, 12, 12
_KDE_NET_WM_BACKGROUND_CONTRAST_REGION(_KDE_NET_WM_BACKGROUND_CONTRAST_REGION) = 0x3f1ed741, 0xbd73d3a2, 0xbd73d3a2, 0x0, 0xbe4d0fe8, 0x3ef5a102, 0xbe4d0fe8, 0x0, 0xbca59c07, 0xbca59c07, 0x3f28e79b, 0x0, 0x3f4cccce, 0x3f4cccce, 0x3f4cccce, 0x3f800000
_KDE_NET_WM_BLUR_BEHIND_REGION(CARDINAL) = 
XdndAware(ATOM) = BITMAP
_NET_WM_NAME(UTF8_STRING) = "plasmashell"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x1, 0x0, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0xa00002
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: False
                Initial state is Normal State.
_NET_WM_PID(CARDINAL) = 8871
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 10485786
WM_CLASS(STRING) = "plasmashell", "plasmashell"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified location: 0, 1050
                user specified size: 1920 by 30
                program specified minimum size: 1920 by 30
                program specified maximum size: 1920 by 30
                window gravity: Static



XProp of popup:

_NET_WM_DESKTOP(CARDINAL) = 4294967295
WM_STATE(WM_STATE):
                window state: Normal                                                                                                                  
                icon window: 0x0                                                                                                                      
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE                                                             
_KDE_NET_WM_ACTIVITIES(STRING) = "00000000-0000-0000-0000-000000000000"                                                                               
_NET_WM_USER_TIME(CARDINAL) = 17363824                                                                                                                
WM_TRANSIENT_FOR(WINDOW): window id # 0xa00019                                                                                                        
_KDE_SLIDE(_KDE_SLIDE) = 0xffffffff, 0x3                                                                                                              
_KDE_NET_WM_SHADOW(CARDINAL) = 10486045, 10486047, 10486048, 10486049, 10486050, 10486051, 10486052, 10486053, 12, 1, 1, 12                           
_KDE_NET_WM_BACKGROUND_CONTRAST_REGION(_KDE_NET_WM_BACKGROUND_CONTRAST_REGION) = 0x1, 0x0, 0x2fb, 0x1, 0x0, 0x1, 0x2fc, 0x17d, 0x3f1ed741, 0xbd73d3a2, 0xbd73d3a2, 0x0, 0xbe4d0fe8, 0x3ef5a102, 0xbe4d0fe8, 0x0, 0xbca59c07, 0xbca59c07, 0x3f28e79b, 0x0, 0x3f4cccce, 0x3f4cccce, 0x3f4cccce, 0x3f800000    
_KDE_NET_WM_BLUR_BEHIND_REGION(CARDINAL) = 1, 0, 763, 1, 0, 1, 764, 381                                                                               
_NET_WM_STATE(ATOM) = _NET_WM_STATE_ABOVE, _NET_WM_STATE_STAYS_ON_TOP, _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_SKIP_PAGER                           
_NET_WM_ICON(CARDINAL) =        Icon (16 x 16):                                                                                                       
XdndAware(ATOM) = BITMAP
_NET_WM_NAME(UTF8_STRING) = "plasmashell"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x1, 0x0, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0xa00002
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: True
                Initial state is Normal State.
_NET_WM_PID(CARDINAL) = 8871
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 10485811
WM_CLASS(STRING) = "plasmashell", "plasmashell"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified location: 1155, 668
                user specified size: 764 by 382
                program specified minimum size: 764 by 256
                window gravity: Static

(xprop of popup also had massive icons, which I cut out here. Interestingly panel didn't)
Comment 6 Martin Flöser 2014-05-28 14:31:06 UTC
please provide output of:
qdbus org.kde.KWin /KWin supportInformation
Comment 7 Romário Rios 2014-05-28 15:23:20 UTC
(In reply to comment #5)
> I seem to be able to reproduce this.
> Romanio, do you have kwin compositing when you start up?
Yes.


(In reply to comment #6)
> please provide output of:
> qdbus org.kde.KWin /KWin supportInformation
Version
=======
KWin version: 4.96.0
Qt Version: 5.3.1

Operation Mode: X11 only

Options
=======
focusPolicy: 0
nextFocusPrefersMouse: false
clickRaise: true
autoRaise: false
autoRaiseInterval: 0
delayFocusInterval: 0
shadeHover: false
shadeHoverInterval: 250
separateScreenFocus: false
placement: 4
focusPolicyIsReasonable: true
borderSnapZone: 10
windowSnapZone: 10
centerSnapZone: 0
snapOnlyWhenOverlapping: false
showDesktopIsMinimizeAll: false
rollOverDesktops: true
focusStealingPreventionLevel: 1
legacyFullscreenSupport: false
operationTitlebarDblClick: 
commandActiveTitlebar1: 0                                                                                              
commandActiveTitlebar2: 30                                                                                             
commandActiveTitlebar3: 2                                                                                              
commandInactiveTitlebar1: 4
commandInactiveTitlebar2: 30
commandInactiveTitlebar3: 2
commandWindow1: 7
commandWindow2: 8
commandWindow3: 8
commandWindowWheel: 31
commandAll1: 10
commandAll2: 3
commandAll3: 14
keyCmdAllModKey: 16777251
showGeometryTip: false
condensedTitle: false
electricBorderMaximize: true
electricBorderTiling: true
electricBorderCornerRatio: 0.25
borderlessMaximizedWindows: false
killPingTimeout: 5000
hideUtilityWindowsForInactive: true
inactiveTabsSkipTaskbar: false
autogroupSimilarWindows: false
autogroupInForeground: true
compositingMode: 1
useCompositing: true
compositingInitialized: true
hiddenPreviews: 1
unredirectFullscreen: false
glSmoothScale: 2
colorCorrected: false
xrenderSmoothScale: false
maxFpsInterval: 16666666
refreshRate: 0
vBlankTime: 6000000
glStrictBinding: false
glStrictBindingFollowsDriver: true
glCoreProfile: true
glPreferBufferSwap: 101
glPlatformInterface: 

Screen Edges
============
desktopSwitching: false
desktopSwitchingMovingClients: false
cursorPushBackDistance: 
timeThreshold: 150
reActivateThreshold: 350
actionTopLeft: 0
actionTop: 0
actionTopRight: 0
actionRight: 0
actionBottomRight: 0
actionBottom: 0
actionBottomLeft: 0
actionLeft: 0

Screens
=======
Multi-Head: no
Active screen follows mouse:  no
Number of Screens: 1
Screen 0 Geometry: 0,0,1920x1080

Decoration
==========
Current Plugin: Oxygen
Shadows: yes
Alpha: yes
Announces Alpha: yes
Tabbing: yes
Frame Overlap: no
Blur Behind: no

Compositing
===========
Compositing is active
Compositing Type: OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile 
OpenGL version string: 3.1 (Core Profile) Mesa 9.2.3
OpenGL platform interface: EGL
OpenGL shading language version string: 1.40
Driver: Intel
GPU class: IvyBridge
OpenGL version: 3.1
GLSL version: 1.40
Mesa version: 9.2.3
X server version: 1.14.3
Linux kernel version: 3.14.4
Direct rendering: Requires strict binding: no
GLSL shaders:  yes
Texture NPOT support:  yes
Virtual Machine:  no
OpenGL 2 Shaders are used
Painting blocks for vertical retrace:  no

Loaded Effects:
---------------
zoom
slidingpopups
kwin4_effect_login
slide
screenshot
minimizeanimation
kwin4_effect_translucency
desktopgrid
kwin4_effect_fade
kwin4_effect_maximize
presentwindows
kwin4_effect_dialogparent
highlightwindow
blur
contrast
logout
dashboard
startupfeedback
screenedge
kscreen

Currently Active Effects:
-------------------------
blur
contrast

Effect Settings:
----------------
zoom:
zoomFactor: 1.2
mousePointer: 0
mouseTracking: 0
enableFocusTracking: false
followFocus: true
focusDelay: 350
moveFactor: 20
targetZoom: 1

slidingpopups:
fadeInTime: 150
fadeOutTime: 250

kwin4_effect_login:

slide:

screenshot:

minimizeanimation:

kwin4_effect_translucency:

desktopgrid:
zoomDuration: 300
border: 10
desktopNameAlignment: 0
layoutMode: 0
customLayoutRows: 2
usePresentWindows: true

kwin4_effect_fade:

kwin4_effect_maximize:

presentwindows:
layoutMode: 0
showCaptions: true
showIcons: true
doNotCloseWindows: false
ignoreMinimized: false
accuracy: 20
fillGaps: true
fadeDuration: 150
showPanel: false
leftButtonWindow: 1
rightButtonWindow: 2
middleButtonWindow: 0
leftButtonDesktop: 2
middleButtonDesktop: 0
rightButtonDesktop: 0

kwin4_effect_dialogparent:

highlightwindow:

blur:
blurRadius: 12
cacheTexture: true

contrast:

logout:
useBlur: true

dashboard:
brightness: 0.5
saturation: 0.5
blur: false

startupfeedback:

screenedge:

kscreen:
Comment 8 Martin Flöser 2014-05-28 15:41:52 UTC
@Marco: please have a look at the property output. If I read that correctly in comment #5 the panel doesn't have any region set.
Comment 9 Bhushan Shah 2014-06-10 06:02:48 UTC
I think I am hitting this, if I disable and enable blur effect it works fine but at startup panel is not being blurred.
Comment 10 Martin Flöser 2014-06-10 06:26:51 UTC
(In reply to comment #9)
> I think I am hitting this, if I disable and enable blur effect it works fine
> but at startup panel is not being blurred.

the panel shouldn't use the blur effect, but the background contrast, doesn't it?
Comment 11 Bhushan Shah 2014-06-10 06:30:38 UTC
On Tue, Jun 10, 2014 at 11:56 AM, Martin Gräßlin <mgraesslin@kde.org> wrote:
> the panel shouldn't use the blur effect, but the background contrast, doesn't
> it?

Yeah I think I confused myself, Contrast effect I mean
Comment 12 Marco Martin 2014-06-10 08:09:50 UTC
this is my panel with blur correctly there (even tough BLUR_BEHIND_REGION( seems empty)

_NET_WM_STRUT(CARDINAL) = 0, 0, 0, 0
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
_KDE_NET_WM_ACTIVITIES(STRING) = "00000000-0000-0000-0000-000000000000"
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_CHANGE_DESKTOP
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_NET_WM_STATE(ATOM) = 
_NET_WM_USER_TIME(CARDINAL) = 758896
_NET_WM_DESKTOP(CARDINAL) = 4294967295
_KDE_NET_WM_SHADOW(CARDINAL) = 132120613, 132120615, 132120616, 132120617, 132120618, 132120619, 132120620, 132120621, 12, 12, 12, 12
_KDE_NET_WM_BACKGROUND_CONTRAST_REGION(_KDE_NET_WM_BACKGROUND_CONTRAST_REGION) = 0x3f1ed741, 0xbd73d3a2, 0xbd73d3a2, 0x0, 0xbe4d0fe8, 0x3ef5a102, 0xbe4d0fe8, 0x0, 0xbca59c07, 0xbca59c07, 0x3f28e79b, 0x0, 0x3f4ccccd, 0x3f4ccccd, 0x3f4ccccd, 0x3f800000
_KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 757863
_KDE_NET_WM_BLUR_BEHIND_REGION(CARDINAL) = 
XdndAware(ATOM) = BITMAP
_NET_WM_NAME(UTF8_STRING) = "plasmashell"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x1, 0x0, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x7e00002
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: False
                Initial state is Normal State.
_NET_WM_PID(CARDINAL) = 3438
WM_CLASS(STRING) = "plasmashell", "plasmashell"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified location: 0, 0                                                                       
                user specified size: 1920 by 29
                program specified minimum size: 1920 by 29
                program specified maximum size: 1920 by 29
                window gravity: Static
Comment 13 Marco Martin 2014-06-10 13:14:39 UTC
here the problem happens with kwin5 and not kwin4

the difference between the panel and the dialogs (that have correctly blur) is that in the dialog a shaped mask is passed, in the panel and panelcontroller it's not, therefore it should just take the whole window, but seems to interpret it instead "don't do anything"
Comment 14 Martin Flöser 2014-06-10 13:28:37 UTC
well no surprise given the code in contrast.cpp:

        // Set the data to a dummy value.
        // This is needed to be able to distinguish between the value not
        // being set, and being set to an empty region.
        w->setData(WindowBackgroundContrastRole, 1);

and later on:
    const QVariant value = w->data(WindowBackgroundContrastRole);
    if (value.isValid()) {
        const QRegion appRegion = qvariant_cast<QRegion>(value);
        if (!appRegion.isEmpty()) {
            region |= appRegion.translated(w->contentsRect().topLeft()) &
                      w->decorationInnerRect();
        } else {
            // An empty region means that the blur effect should be enabled
            // for the whole window.
            region = w->decorationInnerRect();
        }
    }

I doubt we can cast a "1" to a QRegion, but I doubt it's empty either. It's just not valid.
Comment 15 David Edmundson 2014-06-10 13:32:15 UTC
What's wrong with that? 
value.isValid() should be true

qvariant_cast<QRegion>(value) should fail, returning a defaultly constructed QRegion, which will be empty

so we get the whole decoration innerRect
I'll add some qDebugs and check what paths we are actually in.
Comment 16 Marco Martin 2014-06-10 13:42:07 UTC
hmm, is blur that's not working, contrast seems fine
Comment 17 Martin Flöser 2014-06-10 13:49:09 UTC
(In reply to comment #16)
> hmm, is blur that's not working, contrast seems fine

now I'm starting to get confused: shouldn't the panel get the contrast?
Comment 18 Marco Martin 2014-06-10 16:13:00 UTC
"now I'm starting to get confused: shouldn't the panel get the contrast?"
Yes it should, and it's working.

what is not working is the *blur* effect, and the reason seems to be a change in behavior of the QByteArray between Qt4 and Qt5.

the code (in blur.cpp):
const QByteArray value = w->readProperty(net_wm_blur_region, XCB_ATOM_CARDINAL, 32);

in Qt4 produces an empty QByteArray, size() = 0, isEmpty() = true, isNull()=false;
in Qt4 produces an empty QByteArray, size() = 0, isEmpty() = true, isNull()=true;

so if (region.isEmpty() && !value.isNull()) { evaluates differently in Qt4 and Qt5


Now, contrast is *not* affected, because the x property passes not only the region but also other numbers, so the value that comes out of readProperty is never isNull()
Comment 19 Marco Martin 2014-06-10 17:32:27 UTC
The issue was in the xcb wrapper, that doesn't appear to make distinction anymore between empty properties and properties that are not set altogether.
this fixes it (don't know if there may be a cleaner approach)
https://git.reviewboard.kde.org/r/118645/
Comment 20 Marco Martin 2014-06-11 09:12:04 UTC
Git commit 490e733590512025783e5fae9f07edc5882e5691 by Marco Martin.
Committed on 11/06/2014 at 09:08.
Pushed by mart into branch 'master'.

Distinguish empty and non existent properties

This restores the behavior on KWin4: if I set an X property that doesn't have any data on a window, it's still information, so this makes the Xcb wrapper return an empty QByteArray that is not null.
EffectWindow::readProperty() now returns an empty QByteArray constructed the same way as it was in KWin4.

REVIEW:118645

M  +19   -0    autotests/test_xcb_wrapper.cpp
M  +17   -7    xcbutils.h

http://commits.kde.org/kwin/490e733590512025783e5fae9f07edc5882e5691