Both those in the code window and the ones that appears when the user select edit perpective. The one that isn't fixed by this is in edit perspective mode, when the user drags a panel out and it becomes a floating window.
Also schedule an event to invalidate it if the emu thread is running.
This is used by the next commit.