This version of Unity is unsupported.

EditorWindow.hasFocus

public bool hasFocus;

Description

Returns true if EditorWindow is focused.