mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEADEV-41971 Clicking background tasks icon (on status bar) doesn't hide window
This commit is contained in:
+8
-8
@@ -57,7 +57,7 @@ public class NotificationComponent extends JLabel implements NotificationModelLi
|
||||
@Override
|
||||
public void mousePressed(final MouseEvent e) {
|
||||
if (UIUtil.isActionClick(e)) {
|
||||
showList();
|
||||
toggleList();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -97,16 +97,16 @@ public class NotificationComponent extends JLabel implements NotificationModelLi
|
||||
getManager().addListener(this);
|
||||
}
|
||||
|
||||
private void showList() {
|
||||
private void toggleList() {
|
||||
JBPopup popup = null;
|
||||
if (myPopupRef != null) {
|
||||
final JBPopup popup = myPopupRef.get();
|
||||
if (popup != null && !popup.isVisible()) {
|
||||
myPopupRef = null;
|
||||
}
|
||||
else if (popup == null) myPopupRef = null;
|
||||
popup = myPopupRef.get();
|
||||
myPopupRef = null;
|
||||
}
|
||||
|
||||
if (myPopupRef == null) {
|
||||
if (popup != null && popup.isVisible()) {
|
||||
popup.cancel();
|
||||
} else {
|
||||
myPopupRef = new WeakReference<JBPopup>(NotificationsListPanel.show(getProject(), this));
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -86,6 +86,8 @@ public class InfoAndProgressPanel extends JPanel implements StatusBarPatch {
|
||||
public void mousePressed(MouseEvent e) {
|
||||
if (!myPopup.isShowing()) {
|
||||
openProcessPopup();
|
||||
} else {
|
||||
hideProcessPopup();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user