@@ -12128,7 +12128,7 @@ if (!J2S._version)
1212812128
1212912129 var doIgnore = function(ev) {
1213012130 return (J2S._dmouseOwner || !ev.target || ("" + ev.target.className)
12131- .indexOf("swingjs-ui") >= 0)
12131+ .indexOf("swingjs-ui") >= 0 || ev.target.tagName == "CANVAS" )
1213212132 };
1213312133
1213412134 var checkStopPropagation = function(ev, ui, handled) {
@@ -12142,16 +12142,18 @@ if (!J2S._version)
1214212142
1214312143
1214412144 J2S.traceMouse = function(what,ev) {
12145- System.out.println(["tracemouse " + what
12146- ,"who", J2S._mouseOwner && J2S._mouseOwner.id
12147- ,"dragging", J2S._mouseOwner && J2S._mouseOwner.isDragging
12148- ,"type",ev.type
12149- ,"doignore",doIgnore(ev)
12150- ,"target.id",ev.target.id
12151- ,"role",ev.target.getAttribute("role")
12152- ,"data-ui",ev.target["data-ui"]
12153- ,"data-component",ev.target["data-component"]
12154- ]);
12145+ System.out.println(["tracemouse:" + what
12146+ ,"type:",ev.type
12147+ ,"target.id:",ev.target.id
12148+ ,"relatedtarget.id:",ev.originalEvent.relatedTarget && ev.originalEvent.relatedTarget.id
12149+ ,"who:", who.id
12150+ ,"dragging:", J2S._mouseOwner && J2S._mouseOwner.isDragging
12151+ ,"doignore:",doIgnore(ev)
12152+ ,"role:",ev.target.getAttribute("role")
12153+ ,"data-ui:",ev.target["data-ui"]
12154+ ,"data-component:",ev.target["data-component"]
12155+ ,"mouseOwner:",J2S._mouseOwner && J2S._mouseOwner.id
12156+ ].join().replace(":,",":"));
1215512157 }
1215612158
1215712159 J2S.$bind(who, 'mousedown touchstart', function(ev) {
@@ -12292,7 +12294,9 @@ if (!J2S._version)
1229212294 });
1229312295
1229412296 J2S.$bind(who, 'mouseout', function(ev) {
12295-
12297+
12298+ J2S._currentTarget = null;
12299+
1229612300 if (J2S._traceMouse)
1229712301 J2S.traceMouse("OUT", ev);
1229812302
@@ -12301,7 +12305,7 @@ if (!J2S._version)
1230112305 if (ev.target.getAttribute("role")) {
1230212306 return true;
1230312307 }
12304-
12308+
1230512309 if (J2S._mouseOwner && !J2S._mouseOwner.isDragging)
1230612310 J2S.setMouseOwner(null);
1230712311 if (who.applet._appletPanel)
@@ -12315,6 +12319,9 @@ if (!J2S._version)
1231512319
1231612320 J2S.$bind(who, 'mouseover', function(ev) {
1231712321
12322+ if (J2S._currentTarget == ev.target)
12323+ return true;
12324+ J2S._currentTarget = ev.target;
1231812325 if (J2S._traceMouse)
1231912326 J2S.traceMouse("ENTER", ev);
1232012327
@@ -12348,7 +12355,7 @@ if (!J2S._version)
1234812355 return true;
1234912356 });
1235012357
12351- if (who.applet._is2D) {
12358+ if (who.applet._is2D && !who.applet._isApp ) {
1235212359 J2S.$resize(function() {
1235312360 if (!who.applet)
1235412361 return;
@@ -12792,13 +12799,15 @@ if (!J2S._version)
1279212799 this._isLayered = Info._isLayered || false; // JSV or SwingJS are
1279312800 // layered
1279412801 this._isSwing = Info._isSwing || false;
12802+ this._isApp = !!Info._main;
1279512803 this._isJSV = Info._isJSV || false;
1279612804 this._isAstex = Info._isAstex || false;
1279712805 this._platform = Info._platform || "";
1279812806 if (checkOnly)
1279912807 return this;
1280012808 window[id] = this;
12801- this._createCanvas(id, Info);
12809+ if (!this._isApp)
12810+ this._createCanvas(id, Info);
1280212811 if (!this._isJNLP && (!J2S._document || this._deferApplet))
1280312812 return this;
1280412813 this._init();
@@ -12998,7 +13007,7 @@ if (!J2S._version)
1299813007 if (s !== null)
1299913008 applet.__Info.args = decodeURIComponent(s);
1300013009 }
13001- var isApp = !!applet.__Info.main;
13010+ var isApp = applet._isApp = !!applet.__Info.main;
1300213011 try {
1300313012 var clazz = (applet.__Info.main || applet.__Info.code);
1300413013 try {
@@ -13153,7 +13162,7 @@ if (!J2S._version)
1315313162 var container = J2S.$(applet, "appletdiv");
1315413163 var w = Math.round(container.width());
1315513164 var h = Math.round(container.height());
13156- if (applet._is2D
13165+ if (applet._is2D && !applet._isApp
1315713166 && (applet._canvas.width != w || applet._canvas.height != h)) {
1315813167 applet._newCanvas(true);
1315913168 applet._appletPanel
0 commit comments