=== modified file 'src/com/goldencode/p2j/ui/client/driver/web/res/p2j.socket.js' --- src/com/goldencode/p2j/ui/client/driver/web/res/p2j.socket.js 2016-04-12 16:24:51 +0000 +++ src/com/goldencode/p2j/ui/client/driver/web/res/p2j.socket.js 2016-04-14 07:38:42 +0000 @@ -48,7 +48,9 @@ ** or to refresh the web application page, added named message types constants, ** fixed TypedArray.slice is unsupported by IE. ** 017 HC 20160406 Overhaul of window-activation logic. -** 018 SBI 20160412 Added MSG_OPEN_URL to open the target page in the browser. +** 018 SBI 20160414 Added MSG_OPEN_URL to open the target page in the browser. Fixed the window +** location coordinates to have 32 bits size if they are send with +** MSG_SET_WINDOW_LOC and MSG_WINDOW_RESIZED. */ "use strict"; @@ -632,7 +634,7 @@ me.sendWindowResized = function(windowId, x, y, width, height) { // send the window activation to the java side - var message = new Uint8Array(1 + 4 + 2 + 2 + 2 + 2); + var message = new Uint8Array(17); var offset = 0; // message type @@ -644,12 +646,12 @@ offset = offset + 4; // 2. the window location - row - writeInt16BinaryMessage(message, offset, y); - offset = offset + 2; + writeInt32BinaryMessage(message, offset, y); + offset = offset + 4; // 3. the window location - column - writeInt16BinaryMessage(message, offset, x); - offset = offset + 2; + writeInt32BinaryMessage(message, offset, x); + offset = offset + 4; // 4. the window width writeInt16BinaryMessage(message, offset, width); @@ -674,7 +676,7 @@ */ me.sendWindowLocation = function(windowId, x, y) { - var message = new Uint8Array(9); + var message = new Uint8Array(13); var offset = 0; // message type @@ -686,10 +688,10 @@ offset = offset + 4; // 2. coordinates - writeInt16BinaryMessage(message, offset, x); - offset = offset + 2; - writeInt16BinaryMessage(message, offset, y); - offset = offset + 2; + writeInt32BinaryMessage(message, offset, x); + offset = offset + 4; + writeInt32BinaryMessage(message, offset, y); + offset = offset + 4; send(message); }; === modified file 'src/com/goldencode/p2j/ui/client/gui/driver/web/GuiWebSocket.java' --- src/com/goldencode/p2j/ui/client/gui/driver/web/GuiWebSocket.java 2016-04-08 12:05:13 +0000 +++ src/com/goldencode/p2j/ui/client/gui/driver/web/GuiWebSocket.java 2016-04-14 07:38:57 +0000 @@ -42,6 +42,8 @@ ** cache. Added MSG_PARSE_EDITOR_CONTENT support. ** SBI 20160324 Added setDesktopBgColor(int red, int green, int blue). ** 013 HC 20160406 Overhaul of window-activation logic. +** 014 SBI 20160414 Fixed the window location coordinates to have 32 bits size if they are send +** with MSG_SET_WINDOW_LOC and MSG_WINDOW_RESIZED. */ package com.goldencode.p2j.ui.client.gui.driver.web; @@ -1351,18 +1353,18 @@ handled = true; } - else if (length == 9 && message[offset] == MSG_SET_WINDOW_LOC) + else if (length == 13 && message[offset] == MSG_SET_WINDOW_LOC) { int idx = offset + 1; int windowId = readMessageInt32(message, idx); idx = idx + 4; - int x = readMessageInt16(message, idx); - idx = idx + 2; + int x = readMessageInt32(message, idx); + idx = idx + 4; - int y = readMessageInt16(message, idx); - idx = idx + 2; + int y = readMessageInt32(message, idx); + idx = idx + 4; this.callbacks.setWindowLocation(windowId, x, y); @@ -1391,18 +1393,18 @@ this.callbacks.windowIconified(windowId, state); } - else if (length == 13 && message[offset] == MSG_WINDOW_RESIZED) + else if (length == 17 && message[offset] == MSG_WINDOW_RESIZED) { int idx = offset + 1; int windowId = readMessageInt32(message, idx); idx = idx + 4; - int y = readMessageInt16(message, idx); - idx = idx + 2; + int y = readMessageInt32(message, idx); + idx = idx + 4; - int x = readMessageInt16(message, idx); - idx = idx + 2; + int x = readMessageInt32(message, idx); + idx = idx + 4; int width = readMessageInt16(message, idx); idx = idx + 2;