Jannis, I've reverted your patch because it's not doing to right thing (larger window, draws on neighbor monitor). I've tried it myself and don't see the problem, so maybe you can provide me with a bit more information. As a start the xwininfo of the autohide window.
I dont think this still applies.