DOC : added warning to doc of get_window_extent

This is in response to issues raised in #2831.

Closes #3055
you mean "lead to unexpected behavior"?