Running this repeatedly: $ xfconf-query -c xfwm4 -p /general/use_compositing; xfconf-query -c xfwm4 -p /general/use_compositing -T; xfconf-query -c xfwm4 -p /general/use_compositing you can see that sometimes you can get the same value(ie. unchanged) three times in a row! ie. false false ^ three times in a row. Also happens for 'true'. Usually you get either: true false or: false true that should always happen, but it doesn't. I took a look at the code but can't find anything obviously wrong or different between the normal and failing case.
Note that manually toggling always works, eg. #!/bin/bash set -e while true; do #xfconf-query -c xfwm4 -p /general/use_compositing; xfconf-query -c xfwm4 -p /general/use_compositing -T; xfconf-query -c xfwm4 -p /general/use_compositing before=$(xfconf-query -c xfwm4 -p /general/use_compositing) #xfconf-query -c xfwm4 -p /general/use_compositing -T if test "$before" == "true"; then wanted="false" elif test "$before" == "false"; then wanted="true" else echo "Fail '$before'" exit 1 fi xfconf-query -c xfwm4 -p /general/use_compositing -s "$wanted" after=$(xfconf-query -c xfwm4 -p /general/use_compositing) if test "$before" == "$after"; then echo "Failed to set to '$wanted', it's still '$after'" exit 1 fi sleep 0.2 done this never fails.
According to: $ xfconf-query --monitor -c xfwm4 it shows that no 'set' is happening when: $ xfconf-query -c xfwm4 -p /general/use_compositing; xfconf-query -c xfwm4 -p /general/use_compositing -T; xfconf-query -c xfwm4 -p /general/use_compositing shows: true true or: false false
ah found it, looks like it was just missing an `xfconf_shutdown ();` on success.... curious that I didn't see that until now! heh
Created attachment 9026 fix
added to CC the author from git blame (2011) commit(s) :D
also adding to CC the author from 2017 (git blame) commit :)
The shutdown call may be missing here too: https://git.xfce.org/xfce/xfconf/tree/xfconf-query/main.c#n414
I can reproduce the issue too
Romain Bouvier referenced this bugreport in commit 3a419d5c16afcaadcb618df6f3cf4ad1cc3e0064 Bug #15960: Add some missing xfconf_shutdown() in xfconf-query https://git.xfce.org/xfce/xfconf/commit?id=3a419d5c16afcaadcb618df6f3cf4ad1cc3e0064
Fixed in master, thank you ! Please confirm before closing the issue
Confirmed working, thanks!
Romain Bouvier referenced this bugreport in commit 10eaaf8cfd94241bbb50c724a7c8d5a9900f146a Bug #15960: Add some missing xfconf_shutdown() in xfconf-query https://gitlab.xfce.org/xfce/xfconf/commit/10eaaf8cfd94241bbb50c724a7c8d5a9900f146a