You need to do some math based on this:
Ulrich wrote extensions to help him with it, but I never tested it, it informs even if a Window is divided between 2 screens and which screen contains the larger part of such window: