aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator
diff options
context:
space:
mode:
authorLyubomir Marinov <lyubomir.marinov@jitsi.org>2012-06-06 22:31:00 +0000
committerLyubomir Marinov <lyubomir.marinov@jitsi.org>2012-06-06 22:31:00 +0000
commitfb39a5cace8dd9fa4b5f2fadf3b13d384079b083 (patch)
tree3357d8aeaea027276f4135c6059776c41633b12d /src/net/java/sip/communicator
parentc58c2dbb076254dbf18648ea12d2d0dfcdf9f5cc (diff)
downloadjitsi-fb39a5cace8dd9fa4b5f2fadf3b13d384079b083.zip
jitsi-fb39a5cace8dd9fa4b5f2fadf3b13d384079b083.tar.gz
jitsi-fb39a5cace8dd9fa4b5f2fadf3b13d384079b083.tar.bz2
Adds a FIXME comment about a cause of leaking ExtendedTooltip instances i.e. the tool tips shown while hovering with the mouse pointer over the contacts in the contact list.
Diffstat (limited to 'src/net/java/sip/communicator')
-rw-r--r--src/net/java/sip/communicator/impl/gui/utils/ExtendedTooltip.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/utils/ExtendedTooltip.java b/src/net/java/sip/communicator/impl/gui/utils/ExtendedTooltip.java
index 48dc8ee..750806b 100644
--- a/src/net/java/sip/communicator/impl/gui/utils/ExtendedTooltip.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/ExtendedTooltip.java
@@ -101,6 +101,11 @@ public class ExtendedTooltip
mainPanel.add(bottomTextArea, BorderLayout.SOUTH);
// Hide the tooltip when the parent window hides.
+ /*
+ * FIXME The parentWindow will surely outlive this ExtendedTooltip so
+ * adding a WindowFocusListener without removing the same
+ * WindowFocusListener later on is guaranteed to cause a memory leak.
+ */
parentWindow.addWindowFocusListener(new WindowFocusListener()
{
public void windowLostFocus(WindowEvent e)
@@ -108,7 +113,7 @@ public class ExtendedTooltip
Window popupWindow
= SwingUtilities.getWindowAncestor(ExtendedTooltip.this);
- if (popupWindow != null
+ if ((popupWindow != null)
&& popupWindow.isVisible()
// The popup window should normally be a JWindow, so we
// check here explicitly if for some reason we didn't get
@@ -134,7 +139,8 @@ public class ExtendedTooltip
if (!parentWindow.isActive())
{
Window popupWindow
- = SwingUtilities.getWindowAncestor(ExtendedTooltip.this);
+ = SwingUtilities.getWindowAncestor(
+ ExtendedTooltip.this);
if (popupWindow != null
&& popupWindow.isVisible()