46 XTrayIconEmbeddedFrame eframe; 47 TrayIconCanvas canvas; 48 InfoWindow.Balloon balloon; 49 InfoWindow.Tooltip tooltip; 50 PopupMenu popup; 51 String tooltipString; 52 boolean isTrayIconDisplayed; 53 long eframeParentID; 54 final XEventDispatcher parentXED, eframeXED; 55 56 static final XEventDispatcher dummyXED = new XEventDispatcher() { 57 public void dispatchEvent(XEvent ev) {} 58 }; 59 60 volatile boolean isDisposed; 61 62 boolean isParentWindowLocated; 63 int old_x, old_y; 64 int ex_width, ex_height; 65 66 final static int TRAY_ICON_WIDTH = 24; 67 final static int TRAY_ICON_HEIGHT = 24; 68 69 XTrayIconPeer(TrayIcon target) 70 throws AWTException 71 { 72 this.target = target; 73 74 eventProxy = new TrayIconEventProxy(this); 75 76 canvas = new TrayIconCanvas(target, TRAY_ICON_WIDTH, TRAY_ICON_HEIGHT); 77 78 eframe = new XTrayIconEmbeddedFrame(); 79 80 eframe.setSize(TRAY_ICON_WIDTH, TRAY_ICON_HEIGHT); 81 eframe.add(canvas); 82 83 // Fix for 6317038: as EmbeddedFrame is instance of Frame, it is blocked 84 // by modal dialogs, but in the case of TrayIcon it shouldn't. So we 85 // set ModalExclusion property on it. 86 AccessController.doPrivileged(new PrivilegedAction<Object>() { 87 public Object run() { | 46 XTrayIconEmbeddedFrame eframe; 47 TrayIconCanvas canvas; 48 InfoWindow.Balloon balloon; 49 InfoWindow.Tooltip tooltip; 50 PopupMenu popup; 51 String tooltipString; 52 boolean isTrayIconDisplayed; 53 long eframeParentID; 54 final XEventDispatcher parentXED, eframeXED; 55 56 static final XEventDispatcher dummyXED = new XEventDispatcher() { 57 public void dispatchEvent(XEvent ev) {} 58 }; 59 60 volatile boolean isDisposed; 61 62 boolean isParentWindowLocated; 63 int old_x, old_y; 64 int ex_width, ex_height; 65 66 static final int TRAY_ICON_WIDTH = 24; 67 static final int TRAY_ICON_HEIGHT = 24; 68 69 XTrayIconPeer(TrayIcon target) 70 throws AWTException 71 { 72 this.target = target; 73 74 eventProxy = new TrayIconEventProxy(this); 75 76 canvas = new TrayIconCanvas(target, TRAY_ICON_WIDTH, TRAY_ICON_HEIGHT); 77 78 eframe = new XTrayIconEmbeddedFrame(); 79 80 eframe.setSize(TRAY_ICON_WIDTH, TRAY_ICON_HEIGHT); 81 eframe.add(canvas); 82 83 // Fix for 6317038: as EmbeddedFrame is instance of Frame, it is blocked 84 // by modal dialogs, but in the case of TrayIcon it shouldn't. So we 85 // set ModalExclusion property on it. 86 AccessController.doPrivileged(new PrivilegedAction<Object>() { 87 public Object run() { |