esjeon / kwin-forceblur

Force-enable blur effect to user-specified windows
MIT License
151 stars 8 forks source link

Not working on qBittorrent after restoring from tray #2

Closed borivojek closed 5 years ago

borivojek commented 5 years ago

qBittorrent stops being blurred after restoring from tray, as if the script has no effect on it. The issue persists even after disabling and re-enabling the script and restarting the system.

esjeon commented 5 years ago

The script does work on my environment, though couldn't make qBittorrent transparent in the first place. You can check if the script is really working or not using the following command:

xprop | grep BLUR

(NOTE: you should click the window of your interest.)

If the script is working correctly, you should see something like this:

_KDE_NET_WM_BLUR_BEHIND_REGION(CARDINAL) = 0

Also I belive the problem is caused by an invalid(?) rule. Even it is so, it's my fault, since the script match only window resource class case-sensitively. People usually mix window resource name and class, and expect case-insensitive matching. I just updated the script to check both in case-insensitive manner.

borivojek commented 5 years ago

Apparently, on my system* the script only works for KeepassXC. I just tested it with Yakuake and it doesn't apply the blur effect. I did check that the correct window resource class is entered in the script settings (at least it appears to be correct). Now, I don't have any window rules that should affect blur or transparency, if that is what you meant by invalid rule? Also, I'm using a Kvantum theme for achieving transparency, I don't know if that has any effect?

*Fedora 29, Plasma 5.15.4, KDE Frameworks 5.55.0

esjeon commented 5 years ago

the script only works for KeepassXC

That kinda says something. Are you using Wayland? AFAIK, KeepassXC doesn't support Wayland right now, so it runs through X11 compat layer. Most other Qt apps run natively on Wayland through Qt.

This script works only on X11 applications because it forces blur effect by changing X11 window properties.

borivojek commented 5 years ago

Are you using Wayland?

No, I'm using X11, which makes this whole issue even weirder now. I'm guessing I might've messed up a config somewhere, but I'm not even sure where to start looking into it.

(It might be worth noting that blur does work (without the script) for every other app on my system, except qBittorrent and Yakuake)

esjeon commented 5 years ago

It can be that you're actually on Wayland, since it has been the default in Fedora since F25. Or you can kwin_x11 --replace in a terminal to see if there's any error being raised from scripts. TBH, this script is brain-dead simple, so I don't think it will bring any complication.

borivojek commented 5 years ago

After running kwin_x11 --replace I got these two errors: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable) for resource id 0 and qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow) for a a few different resource IDs Though, it doesn't seem to me that these are script-related (major code points to window geometry and GetProperty/DeleteProperty). And even after this, the issue persists with qBittorrent and Yakuake, sadly.

esjeon commented 5 years ago

I dug into Fedora 29 and found out the reason. The script was failing due to QtQuick.Window version mismatch. I realized I never tested this in other distros. I'll update the script right away.

btw, the errors you mentioned are totally safe and unrelated.

esjeon commented 5 years ago

commit c2afe72fadbafa926bdd75478049a6bf4a42f99b solves the issue, and tested on Ubuntu 1810/1904, Fedora 29, and Arch.