fix for JAL-776
authorjprocter <Jim Procter>
Tue, 15 Feb 2011 16:30:33 +0000 (16:30 +0000)
committerjprocter <Jim Procter>
Tue, 15 Feb 2011 16:30:33 +0000 (16:30 +0000)
src/jalview/gui/Desktop.java

index 580fceb..c58de43 100755 (executable)
@@ -27,6 +27,7 @@ import java.awt.dnd.*;
 import java.awt.event.*;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
+import java.beans.PropertyVetoException;
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
 import java.io.File;
@@ -577,6 +578,47 @@ public class Desktop extends jalview.jbgui.GDesktop implements
         }
       }
     });
+    menuItem.addMouseListener(new MouseListener()
+    {
+      
+      @Override
+      public void mouseReleased(MouseEvent e)
+      {
+      }
+      
+      @Override
+      public void mousePressed(MouseEvent e)
+      {
+      }
+      
+      @Override
+      public void mouseExited(MouseEvent e)
+      {
+        try
+        {
+          frame.setSelected(false);
+        } catch (PropertyVetoException e1)
+        {
+        }
+      }
+      
+      @Override
+      public void mouseEntered(MouseEvent e)
+      {
+        try
+        {
+          frame.setSelected(true);
+        } catch (PropertyVetoException e1)
+        {
+        }
+      }
+      
+      @Override
+      public void mouseClicked(MouseEvent e)
+      {
+        
+      }
+    });
 
     windowMenu.add(menuItem);