Mac apparently considers y-coords to have their origin at the bottom, so the computation of the TCP rectangle comes out negative in getClientBounds(). For Mac the height should be calculated as top - bottom, rather than bottom - topas on Windows and Linux.
So, we need to check if we are on Mac or not, and if so, swap the subtraction.
Mac apparently considers y-coords to have their origin at the bottom, so the computation of the TCP rectangle comes out negative in getClientBounds(). For Mac the height should be calculated as
top - bottom
, rather thanbottom - top
as on Windows and Linux.So, we need to check if we are on Mac or not, and if so, swap the subtraction.