The bug doesn't reproduce anymore. Both the extracted-from-xfwm4.c test program and xfwm4 now work, on my Ubuntu 16.04 machine with the NVIDIA GeForce 750 Ti card. I configured it back to nouveau and enabled compositing.
I'm guessing an update fixed it? $ lsb_release -rd Description: Ubuntu 16.04.2 LTS Release: 16.04 $ uname -a Linux atom 4.4.0-77-generic #98-Ubuntu SMP Wed Apr 26 08:34:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux $ apt-cache policy xorg xorg: Installed: 1:7.7+13ubuntu3 Candidate: 1:7.7+13ubuntu3 Version table: *** 1:7.7+13ubuntu3 500 500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages 100 /var/lib/dpkg/status $ apt-cache policy xserver-xorg-video-nouveau xserver-xorg-video-nouveau: Installed: 1:1.0.12-1build2 Candidate: 1:1.0.12-1build2 Version table: *** 1:1.0.12-1build2 500 500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages 100 /var/lib/dpkg/status (I suppose I should have included libcairo2 originally?) $ apt-cache policy libcairo2 libcairo2: Installed: 1.14.6-1 Candidate: 1.14.6-1 Version table: *** 1.14.6-1 500 500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages 100 /var/lib/dpkg/status (The xfmw4 version number is bogus -- I'm using my own patched version to work around an incompatibility with VirtualBox.) $ apt-cache policy xfwm4 xfwm4: Installed: 4.12.3-9ubuntu2 Candidate: 4.12.3-9ubuntu2 Version table: *** 4.12.3-9ubuntu2 100 100 /var/lib/dpkg/status 4.12.3-1ubuntu2 500 500 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to xorg in Ubuntu. https://bugs.launchpad.net/bugs/1606122 Title: Cairo drawing coordinates are broken w/nouveau (affects xfwm4) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1606122/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp