Is this a regression? Did kwin work properly with an older kernel or mesa? If so, can you narrow down what component caused the problem and then bisect?