This probably caused many problems, but the one I noticed is that the turtle didn't move until the window was resized.
The fix was implemented by rewriting GetScreenWindow and GetMainWindow in terms of their "Wx" counterparts, which makes the implementation clearer.