From 6cbd219db5759ecd2b3a8e73a6308cd1f212fa32 Mon Sep 17 00:00:00 2001 From: Konstantin Nisht Date: Tue, 27 May 2025 15:41:20 +0200 Subject: [PATCH] [threading] KTIJ-34335 IDEA-373502: Wrap modal dialogs into background write action unless they are modal progresses This is a technical debt, in the ideal world dialogs do not run with write-intent read action in order to permit background WA bound to them GitOrigin-RevId: 30a39877c8de8f92644c925124e21dd9222e6136 --- .../src/com/intellij/openapi/ui/DialogWrapper.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java b/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java index eaaaceedc1fe..22bace3b492c 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java @@ -1819,7 +1819,13 @@ public abstract class DialogWrapper { ClientProperty.put(window, KEEP_POPUPS_OPEN, myKeepPopupsOpen); } - myPeer.show(); + if (!isProgressDialog()) { + WriteIntentReadAction.run((Runnable) () -> { + myPeer.show(); + }); + } else { + myPeer.show(); + } } /**