Closed mgarin closed 4 years ago
The problem was in PopupMenuPainter
that didn't properly uninstall custom JPopupMenu
window shape when it is hidden (even though the code for cleaning up the shape is there). I already found the way to fix it and cleaned up surrounding code a bit, will be pushing a fix soon.
I've added a fix for this issue. I tried to extensively test it across different systems and JDK versions to ensure that it doesn't break anything. I'll also do some more testing later this week under Mac OS X to maybe add some more changes to this part of the code.
Changes will be shortly available in v1.2.12 snapshot.
Reported by @Sciss on gitter:
The code that can be used to reproduce the issue (on Linux systems):
It can also be reproduced on Windows if
SystemUtils
system type output is manually changed to always say that it is a Linux system.The problem is that
JToolTip
reuses popup thatJPopupMenu
uses (due to SwingPopupManager
optimizations). So whenever aJPopupMenu
is invoked it setups it's own shape on the window, that shape is preserved for the tooltips displayed later on, even thought it shouldn't be.