forked from AuroraMiddleware/gtk
[broadway] Fix various js warnings
This commit is contained in:
parent
840df5c7c1
commit
ca49ec2c8c
@ -76,7 +76,7 @@ var base64Values = [
|
|||||||
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,255,255,255,255,255,
|
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,255,255,255,255,255,
|
||||||
255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
|
255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
|
||||||
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,255,255,255,255,255
|
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,255,255,255,255,255
|
||||||
]
|
];
|
||||||
|
|
||||||
function base64_8(str, index) {
|
function base64_8(str, index) {
|
||||||
var v =
|
var v =
|
||||||
@ -726,20 +726,21 @@ function handleCommands(cmdObj)
|
|||||||
var i = cmdObj.pos;
|
var i = cmdObj.pos;
|
||||||
|
|
||||||
while (i < cmd.length) {
|
while (i < cmd.length) {
|
||||||
|
var id, x, y, w, h, q;
|
||||||
var command = cmd[i++];
|
var command = cmd[i++];
|
||||||
lastSerial = base64_32(cmd, i);
|
lastSerial = base64_32(cmd, i);
|
||||||
i = i + 6;
|
i = i + 6;
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 's': // create new surface
|
case 's': // create new surface
|
||||||
var id = base64_16(cmd, i);
|
id = base64_16(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
var x = base64_16s(cmd, i);
|
x = base64_16s(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
var y = base64_16s(cmd, i);
|
y = base64_16s(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
var w = base64_16(cmd, i);
|
w = base64_16(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
var h = base64_16(cmd, i);
|
h = base64_16(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
var isTemp = cmd[i] == '1';
|
var isTemp = cmd[i] == '1';
|
||||||
i = i + 1;
|
i = i + 1;
|
||||||
@ -747,19 +748,19 @@ function handleCommands(cmdObj)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'S': // Show a surface
|
case 'S': // Show a surface
|
||||||
var id = base64_16(cmd, i);
|
id = base64_16(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
cmdShowSurface(id);
|
cmdShowSurface(id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'H': // Hide a surface
|
case 'H': // Hide a surface
|
||||||
var id = base64_16(cmd, i);
|
id = base64_16(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
cmdHideSurface(id);
|
cmdHideSurface(id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'p': // Set transient parent
|
case 'p': // Set transient parent
|
||||||
var id = base64_16(cmd, i);
|
id = base64_16(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
var parentId = base64_16(cmd, i);
|
var parentId = base64_16(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
@ -767,33 +768,33 @@ function handleCommands(cmdObj)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'd': // Delete surface
|
case 'd': // Delete surface
|
||||||
var id = base64_16(cmd, i);
|
id = base64_16(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
cmdDeleteSurface(id);
|
cmdDeleteSurface(id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'm': // Move a surface
|
case 'm': // Move a surface
|
||||||
var id = base64_16(cmd, i);
|
id = base64_16(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
var x = base64_16(cmd, i);
|
x = base64_16(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
var y = base64_16(cmd, i);
|
y = base64_16(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
cmdMoveSurface(id, x, y);
|
cmdMoveSurface(id, x, y);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'r': // Resize a surface
|
case 'r': // Resize a surface
|
||||||
var id = base64_16(cmd, i);
|
id = base64_16(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
var w = base64_16(cmd, i);
|
w = base64_16(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
var h = base64_16(cmd, i);
|
h = base64_16(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
cmdResizeSurface(id, w, h);
|
cmdResizeSurface(id, w, h);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'i': // Put image data surface
|
case 'i': // Put image data surface
|
||||||
var q = new Object();
|
q = new Object();
|
||||||
q.op = 'i';
|
q.op = 'i';
|
||||||
q.id = base64_16(cmd, i);
|
q.id = base64_16(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
@ -816,7 +817,7 @@ function handleCommands(cmdObj)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'b': // Copy rects
|
case 'b': // Copy rects
|
||||||
var q = new Object();
|
q = new Object();
|
||||||
q.op = 'b';
|
q.op = 'b';
|
||||||
q.id = base64_16(cmd, i);
|
q.id = base64_16(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
@ -846,14 +847,14 @@ function handleCommands(cmdObj)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'f': // Flush surface
|
case 'f': // Flush surface
|
||||||
var id = base64_16(cmd, i);
|
id = base64_16(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
|
|
||||||
cmdFlushSurface(id);
|
cmdFlushSurface(id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'g': // Grab
|
case 'g': // Grab
|
||||||
var id = base64_16(cmd, i);
|
id = base64_16(cmd, i);
|
||||||
i = i + 3;
|
i = i + 3;
|
||||||
var ownerEvents = cmd[i++] == '1';
|
var ownerEvents = cmd[i++] == '1';
|
||||||
|
|
||||||
@ -1133,7 +1134,7 @@ function onMouseWheel(ev)
|
|||||||
{
|
{
|
||||||
updateForEvent(ev);
|
updateForEvent(ev);
|
||||||
if (localGrab)
|
if (localGrab)
|
||||||
return;
|
return false;
|
||||||
ev = ev ? ev : window.event;
|
ev = ev ? ev : window.event;
|
||||||
|
|
||||||
var id = getSurfaceId(ev);
|
var id = getSurfaceId(ev);
|
||||||
|
Loading…
Reference in New Issue
Block a user