(coordinate, monitor_limits)
Detect which monitor the mouse is currently over.
Detect which monitor the mouse is currently over.
Detect which monitor the mouse is currently over .
def monitor_offset(coordinate, monitor_limits):
    """Detect which monitor the mouse is currently over."""
    if coordinate is None:
        return
    mx, my = coordinate
    for x1, y1, x2, y2 in monitor_limits:
        if x1 <= mx < x2 and y1 <= my < y2:
            return ((x2 - x1, y2 - y1), (x1, y1))
def monitor_offset ( coordinate , monitor_limits ) : if coordinate is None : return mx , my = coordinate for x1 , y1 , x2 , y2 in monitor_limits : if x1 <= mx < x2 and y1 <= my < y2 : return ( ( x2 - x1 , y2 - y1 ) , ( x1 , y1 ) )