Sdl windowevent focus

Adds support for sending SDL window events as a response to page focus changes, written by Michael Bishop.