JRE-1163 [IDEA-187439] Modal dialogs (e.g commit dialog or diff from it) are sometimes invisible

(cherry picked from commit 9c9b4517490816d5df7a5e3017ebdbac2caa30bd)
diff --git a/src/windows/native/sun/windows/awt_Window.cpp b/src/windows/native/sun/windows/awt_Window.cpp
index b6fe3fa..c085db5 100644
--- a/src/windows/native/sun/windows/awt_Window.cpp
+++ b/src/windows/native/sun/windows/awt_Window.cpp
@@ -230,6 +230,8 @@
 
     fullScreenExclusiveModeState = FALSE;
     m_overriddenHwnd = NULL;
+
+    ::SetRect(&m_boundsOnDPIChange, 0, 0, 0, 0);
 }
 
 AwtWindow::~AwtWindow()
@@ -968,7 +970,8 @@
                            bounds->right - bounds->left, bounds->bottom - bounds->top,
                            SWP_NOZORDER | SWP_NOACTIVATE);
     } else {
-        // DPI of this screen changed. Store the new bounds for async update.
+        // Either DPI of this screen changed, or the window moved to a new screen by a shortcut (shift+meta+arrow).
+        // Store the new bounds for async update.
         ::CopyRect(&m_boundsOnDPIChange, bounds);
     }
     return mrConsume;