From dd123f6c515a41b1c3c60a0fc0493fb3afe8e683 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Wed, 21 Aug 2019 07:46:16 +0200 Subject: [PATCH] [ui] invokes libnotify.notify_notification_show() from a background thread to prevent UI freezes (EA-210502) GitOrigin-RevId: 822f000c94495bf90e32ead592f81b069eaa5e3a --- .../src/com/intellij/ui/LibNotifyWrapper.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ui/LibNotifyWrapper.java b/platform/platform-impl/src/com/intellij/ui/LibNotifyWrapper.java index 797b20e4981f..c5ede815e287 100644 --- a/platform/platform-impl/src/com/intellij/ui/LibNotifyWrapper.java +++ b/platform/platform-impl/src/com/intellij/ui/LibNotifyWrapper.java @@ -62,11 +62,13 @@ class LibNotifyWrapper implements SystemNotificationsImpl.Notifier { @Override public void notify(@NotNull String name, @NotNull String title, @NotNull String description) { - synchronized (myLock) { - if (!myDisposed) { - Pointer notification = myLibNotify.notify_notification_new(title, description, myIcon); - myLibNotify.notify_notification_show(notification, null); + ApplicationManager.getApplication().executeOnPooledThread(() -> { + synchronized (myLock) { + if (!myDisposed) { + Pointer notification = myLibNotify.notify_notification_new(title, description, myIcon); + myLibNotify.notify_notification_show(notification, null); + } } - } + }); } } \ No newline at end of file