Add support for checking windowfocus