EditorWindow is visible

Hi, i want to know if there is any way to know if a editor window is visible, for example if you have it attached next to the inspector tab but you are on the inspector tab, is not visible.

Hacky stuff is welcomed.

Example:

alt text

OnFocus() and OnLostFocus() are what you looking for.

I hate Unity misleading documents.

Sorry for replying to old question, but I faced this issue today and tried to solve it with no luck of googling it.

bool isGameViewVisible = !(Screen.width == 640 && Screen.height == 480);