From 09fa520e3fb07cab5070dbd87a96e227efc7ef35 Mon Sep 17 00:00:00 2001 From: Filip Zybala Date: Tue, 28 Feb 2023 16:25:31 +0100 Subject: [PATCH] [remotedev] GTW-1384 Fix layout of progress dialogs in Gateway started from IDE GitOrigin-RevId: 48008cd12fe1696c9e023e84e50fe6da4c4fb982 --- .../src/com/intellij/openapi/progress/util/ProgressDialog.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressDialog.kt b/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressDialog.kt index 3dac62b5bdbb..14d7e20397a5 100644 --- a/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressDialog.kt +++ b/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressDialog.kt @@ -248,7 +248,10 @@ class ProgressDialog(private val myProgressWindow: ProgressWindow, } } } - if (window.isShowing) { + // GTW-1384 - If the parent window is JOptionPane.getRootFrame() then invoke DialogWrapper(Component) instead of DialogWrapper(Project) + // because otherwise the ToolbarUtil.setTransparentTitleBar(...) is invoked. + // AFAIU: It should only affect progresses that are shown without any parent window (like the Gateway started from IDE) + if (window.isShowing || window == JOptionPane.getRootFrame()) { return MyDialogWrapper(window) } return MyDialogWrapper(myProgressWindow.myProject)