One idea that came to me is that negative offsets could be interpreted
as absolute distances between the X (Y) position of the mouse and the
right (bottom) border of the tooltip frame (and to leave positive offsets
relative to the left (top) border as they work now). This way no matter
what values offsets will have, the tooltip frame will never cover the mouse
pointer. And this will work exactly the same way as currently calculations
behave to avoid the tooltip displayed outside the screen (i.e. negating the
interpretation of offsets to opposite sides of the tooltip frame).