title: Why isn't TrayIcon receiving mouse events?
body: <p>I am trying to fix a broken tray icon in an open source project. I have almost no experience with GUIs in Java, I am lost. I would appreciate any tips.</p>
  
  <p>I am testing it in KDE, tray icon is shown and changes status (image) correctly, but title is wrong (always JEmbeddedFrame, despite the fact method is called with right string) and no click events are fired.</p>
  
  <pre><code>        trayIcon.addActionListener(new ActionListener() {
  
              // this is never called :(
              public void actionPerformed(final ActionEvent event) { 
                  if (!mainFrame.isVisible()) {
                      mainFrame.setVisible(true);
                  }
  
                  mainFrame.setState(JFrame.NORMAL);
                  mainFrame.requestFocus();
              }
  
          });
  </code></pre>
  
  <p>I even stepped into <code>TrayIcon</code> class to find that only mouse enter/leave events are begin fired, but never press, release or click. Is this a bug in JRE or am I missing something?</p>
  
  <p>The question is: <strong>How to fix the tray icon to receive mouse events (mainly click one) in KDE?</strong></p>
  
  <p>My Java version is <code>Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)</code> and KDE is 5.5.5 (Kubuntu LTS).</p>
  
  <p>Code: <a href="https://github.com/mnn/baralga/blob/master/baralga-core/src/main/java/org/remast/baralga/gui/TrayIcon.java#L68" rel="nofollow">https://github.com/mnn/baralga/blob/master/baralga-core/src/main/java/org/remast/baralga/gui/TrayIcon.java#L68</a></p>