DesktopWindow.Deactivated
From Xojo Documentation
Event
The window has been deactivated. For example, a window belonging to another app has been activated.
The window has been deactivated. For example, a window belonging to another app has been activated.