forked from External/mage
Improved fix for #584 by Nidhoegger.
This commit is contained in:
parent
25ca463520
commit
0f5f8493c7
1 changed files with 6 additions and 5 deletions
|
|
@ -39,6 +39,8 @@ import java.awt.Component;
|
|||
import java.awt.EventQueue;
|
||||
import java.awt.KeyboardFocusManager;
|
||||
import java.awt.MenuComponent;
|
||||
import java.awt.TrayIcon;
|
||||
import java.awt.event.InvocationEvent;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.beans.PropertyVetoException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
|
@ -118,11 +120,10 @@ public class MageDialog extends javax.swing.JInternalFrame {
|
|||
Object source = event.getSource();
|
||||
boolean dispatch = true;
|
||||
|
||||
// LINUX: Workaround fix for announce X Value Bug that closes modal windows under linux before values can be entered
|
||||
// https://github.com/magefree/mage/issues/584
|
||||
// if (event.getSource() != null && event.getSource() instanceof TrayIcon) {
|
||||
// return;
|
||||
// }
|
||||
// https://github.com/magefree/mage/issues/584 - Let's hope this will fix the Linux window problem
|
||||
if (event.getSource() != null && event.getSource() instanceof TrayIcon && !(event instanceof InvocationEvent)) {
|
||||
return;
|
||||
}
|
||||
if (event instanceof MouseEvent && event.getSource() instanceof Component) {
|
||||
MouseEvent e = (MouseEvent) event;
|
||||
MouseEvent m = SwingUtilities.convertMouseEvent((Component) e.getSource(), e, this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue