Turns out framebuffer draw recalibrates mouse_x and mouse_y, which then calls into hook. Which is no-no, because framebuffer draw runs in GUI thread, and hooks must run in game thread.