This fixes cases where a widget's parent isn't the top-level window and additional offset has to be taken into account. So far this has not been an issue since this method was only used for floating text entries.
70ad205bc1