bugfix: added fallback for off-screen centered dialogs (e.g. in IDEA Ultimate Edition)