yshui / picom

A lightweight compositor for X11 with animation support
https://picom.app/
Other
4.08k stars 584 forks source link

Picom incorrectly parses opacity rules when the name inclue parentheses #746

Closed Delayless closed 2 years ago

Delayless commented 2 years ago

opacity-rule = [ "100:name *= 'Chrome'", ]

when I open the website that the url include parentheses, the picom opacity rules is unmatch(I set opaque, but it become semi-transparent). Exactly not url but xwininfo window name e.g. https://wiki.gentoo.org/wiki/Profile_(Portage)

$ xwininfo & slock
# output
xwininfo: Window id: 0x1600003 "Profile (Portage) - Gentoo Wiki - Google Chrome"



the same issue opening the following url(updating...)

e.g. https://www.google.com.hk/search?q=rofi https://github.com/adi1090x/rofi https://github.com/dkarter/bullets.vim/issues/68

tryone144 commented 2 years ago

Assuming this is your configuration (please provide such information with your issues), then the rule in line 184 is the culprit.

Rules are applied from top to bottom and processing stops after the first matching one. The 80:name *= 'rofi' rule applies to ALL windows that contain rofi in their title; which just so happens to also hold true for pROFIle — nothing to do with the parentheses. The later rule for chrome is not checked anymore. You might want to swap these rules to give them the correct priority or use more specific rules, i.e. depending on the class or instance name (class_g or class_i instead of name).