in reply to Florian

Physical displays or virtual windows? For physical displays, pressing Windows+shift+arrows moves a window between monitors and reports it, but I'm not sure how to query which display a window is on without moving it.

For virtual windows, If you press Windows+tab it opens the task view window with the current app active. Press tab once to the list of desktops. The focus starts on the first desktop. Press right arrow to move through and the one which doesn't say "not selected" is active