Bug 370899 - WM_NAME(STRING) is empty - Unable to apply transparency blur
Summary: WM_NAME(STRING) is empty - Unable to apply transparency blur
Status: RESOLVED WORKSFORME
Alias: None
Product: yakuake
Classification: Applications
Component: general (show other bugs)
Version: 3.0.2
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Eike Hein
URL:
Keywords: investigated, triaged
Depends on:
Blocks:
 
Reported: 2016-10-15 05:11 UTC by geniusiknowit
Modified: 2018-09-19 14:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description geniusiknowit 2016-10-15 05:11:36 UTC
The WM_NAME(STRING) property is empty for Yakuake 3.0.2. 
In Yakuake 2.9.9, this string contains the value "Yakuake".

With v2.9.9, I am able to use xprop in my bashrc file to get the name of the window and apply a transparency blur to it. As of v3.0.2, I am unable to do this. 

The code I am using is below:

konsolex=$(qdbus | grep konsole | cut -f 2 -d\ )
if [ -n konsolex ]; then
for konsole in $konsolex
do
for (( c=1; ; c++ ))
do
konsolewindows=$(qdbus org.kde.konsole | grep MainWindow_$c )
if [ -n "$konsolewindows" ]; then
xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id `qdbus $konsole /konsole/MainWindow_$c winId`;
else
break;
fi
done
done
fi
if [ `qdbus | grep yakuake` ]; then
xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -name Yakuake;
fi
Comment 1 Eike Hein 2016-10-15 13:11:05 UTC
Can't reproduce with git master, 

WM_CLASS(STRING) = "yakuake", "yakuake"

Can you try master?

Setting WORKSFORME until there's more info.
Comment 2 geniusiknowit 2017-02-03 07:35:13 UTC
(In reply to Eike Hein from comment #1)
> Can't reproduce with git master, 
> 
> WM_CLASS(STRING) = "yakuake", "yakuake"
> 
> Can you try master?
> 
> Setting WORKSFORME until there's more info.


I verified I have the same problem with 3.0.2 master.

To clarify, WM_NAME(STRING) is empty, not WM_CLASS(STRING).

So xprop returns the following for yakuake.

WM_NAME(STRING) = 
_NET_WM_NAME(UTF8_STRING) = "Yakuake"
_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
_KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 196850
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x3c00008
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: True
                Initial state is Normal State.
_NET_WM_PID(CARDINAL) = 1955
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 62914567
WM_CLASS(STRING) = "yakuake", "yakuake"
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: 96, 0
                user specified size: 1728 by 470
                window gravity: Static


After inserting the code in my prior comment into .bashrc, both yakuake and konsole display the following error upon being launched.

xprop: error: No window with name Yakuake exists!
Comment 3 Eike Hein 2017-02-04 04:05:23 UTC
Then use WM_CLASS instead of WM_NAME ...?
Comment 4 Lim Yuen Hoe 2017-02-22 17:49:19 UTC
> konsolex=$(qdbus | grep konsole | cut -f 2 -d\ )
> if [ -n konsolex ]; then
> for konsole in $konsolex
> do
> for (( c=1; ; c++ ))
> do
> konsolewindows=$(qdbus org.kde.konsole | grep MainWindow_$c )
> if [ -n "$konsolewindows" ]; then
> xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set
> _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id `qdbus $konsole /konsole/MainWindow_$c
> winId`;
> else
> break;
> fi
> done
> done
> fi
> if [ `qdbus | grep yakuake` ]; then
> xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set
> _KDE_NET_WM_BLUR_BEHIND_REGION 0 -name Yakuake;
> fi

I am the author of this script. The problem is that xprop is only able to select windows by either window name or window id, and not class. However, it's possible to workaround by using xdotool. Instead of -name Yakuake in the xprop command, use -id `xdotool search --class yakuake` instead:

xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id `xdotool search --class yakuake`;
Comment 5 Andrew Crouthamel 2018-09-19 14:41:48 UTC
This bug has had its resolution changed, but accidentally has been left in NEEDSINFO status. I am thus closing this bug and setting the status as RESOLVED to reflect the resolution change.