Skip to main content

Tray Icon API and xfce4-panel

1 reply [Last post]
Joined: 2004-06-12

Hi all!

I ran into serveral problems running this app:

<br />
import javax.swing.*;<br />
import org.jdesktop.jdic.tray.*;</p>
<p>class TestTray<br />
{<br />
    public static void main(String argv[])<br />
    {<br />
        SystemTray st = SystemTray.getDefaultSystemTray();<br />
        JPopupMenu popup = new JPopupMenu();<br />
        popup.add(new JMenuItem("Hello World"));<br />
        TrayIcon ti = new TrayIcon(new ImageIcon("icon.png"), "Test", popup);<br />
        st.addTrayIcon(ti);<br />
    }<br />
}<br />

I'm using sun_jdk v1.4.2_04 and sun_jdk v1.5.0_beta2 on Gentoo Linux/XFree86 4.3.0-r5/xfce4-panel 4.0.5/xfce4-systray.

Problems with both jdks:
- The TrayIcon doesn't get properly updated if the popup is hidden. The (former) background of the popup is replaced with a small version of the icon. If you show/hide the popup several times you end up having many icons at once. If you hide the panel and bring it up again, the icon is properly displayed.

Problems with jdk_1.5.0_beta2:
- The xfce4-panel automatically hides if the mouse cursor gets out of the panel, but so does the popup. With jdk_1.4.2_04 the popup stays on the screen.

I don't know whether it's a problem of xfce4/the tray icon library/the jdk or a kind of bad interaction between them. And unfortunately i don't know either much about x programming, so I hope someone else can fix the problem.


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-16

Hi Thorsten,
I will look into the problem you ran into. I had not tested
under Gentoo linux with xfce4-systray. Thanks for finding the problem
and reporting it.