1
|
=== modified file 'src/com/goldencode/p2j/ui/client/driver/web/res/p2j.socket.js'
|
2
|
--- src/com/goldencode/p2j/ui/client/driver/web/res/p2j.socket.js 2016-04-12 16:24:51 +0000
|
3
|
+++ src/com/goldencode/p2j/ui/client/driver/web/res/p2j.socket.js 2016-04-14 07:38:42 +0000
|
4
|
@@ -48,7 +48,9 @@
|
5
|
** or to refresh the web application page, added named message types constants,
|
6
|
** fixed TypedArray.slice is unsupported by IE.
|
7
|
** 017 HC 20160406 Overhaul of window-activation logic.
|
8
|
-** 018 SBI 20160412 Added MSG_OPEN_URL to open the target page in the browser.
|
9
|
+** 018 SBI 20160414 Added MSG_OPEN_URL to open the target page in the browser. Fixed the window
|
10
|
+** location coordinates to have 32 bits size if they are send with
|
11
|
+** MSG_SET_WINDOW_LOC and MSG_WINDOW_RESIZED.
|
12
|
*/
|
13
|
|
14
|
"use strict";
|
15
|
@@ -632,7 +634,7 @@
|
16
|
me.sendWindowResized = function(windowId, x, y, width, height)
|
17
|
{
|
18
|
// send the window activation to the java side
|
19
|
- var message = new Uint8Array(1 + 4 + 2 + 2 + 2 + 2);
|
20
|
+ var message = new Uint8Array(17);
|
21
|
var offset = 0;
|
22
|
|
23
|
// message type
|
24
|
@@ -644,12 +646,12 @@
|
25
|
offset = offset + 4;
|
26
|
|
27
|
// 2. the window location - row
|
28
|
- writeInt16BinaryMessage(message, offset, y);
|
29
|
- offset = offset + 2;
|
30
|
+ writeInt32BinaryMessage(message, offset, y);
|
31
|
+ offset = offset + 4;
|
32
|
|
33
|
// 3. the window location - column
|
34
|
- writeInt16BinaryMessage(message, offset, x);
|
35
|
- offset = offset + 2;
|
36
|
+ writeInt32BinaryMessage(message, offset, x);
|
37
|
+ offset = offset + 4;
|
38
|
|
39
|
// 4. the window width
|
40
|
writeInt16BinaryMessage(message, offset, width);
|
41
|
@@ -674,7 +676,7 @@
|
42
|
*/
|
43
|
me.sendWindowLocation = function(windowId, x, y)
|
44
|
{
|
45
|
- var message = new Uint8Array(9);
|
46
|
+ var message = new Uint8Array(13);
|
47
|
var offset = 0;
|
48
|
|
49
|
// message type
|
50
|
@@ -686,10 +688,10 @@
|
51
|
offset = offset + 4;
|
52
|
|
53
|
// 2. coordinates
|
54
|
- writeInt16BinaryMessage(message, offset, x);
|
55
|
- offset = offset + 2;
|
56
|
- writeInt16BinaryMessage(message, offset, y);
|
57
|
- offset = offset + 2;
|
58
|
+ writeInt32BinaryMessage(message, offset, x);
|
59
|
+ offset = offset + 4;
|
60
|
+ writeInt32BinaryMessage(message, offset, y);
|
61
|
+ offset = offset + 4;
|
62
|
|
63
|
send(message);
|
64
|
};
|
65
|
|
66
|
=== modified file 'src/com/goldencode/p2j/ui/client/gui/driver/web/GuiWebSocket.java'
|
67
|
--- src/com/goldencode/p2j/ui/client/gui/driver/web/GuiWebSocket.java 2016-04-08 12:05:13 +0000
|
68
|
+++ src/com/goldencode/p2j/ui/client/gui/driver/web/GuiWebSocket.java 2016-04-14 07:38:57 +0000
|
69
|
@@ -42,6 +42,8 @@
|
70
|
** cache. Added MSG_PARSE_EDITOR_CONTENT support.
|
71
|
** SBI 20160324 Added setDesktopBgColor(int red, int green, int blue).
|
72
|
** 013 HC 20160406 Overhaul of window-activation logic.
|
73
|
+** 014 SBI 20160414 Fixed the window location coordinates to have 32 bits size if they are send
|
74
|
+** with MSG_SET_WINDOW_LOC and MSG_WINDOW_RESIZED.
|
75
|
*/
|
76
|
|
77
|
package com.goldencode.p2j.ui.client.gui.driver.web;
|
78
|
@@ -1351,18 +1353,18 @@
|
79
|
|
80
|
handled = true;
|
81
|
}
|
82
|
- else if (length == 9 && message[offset] == MSG_SET_WINDOW_LOC)
|
83
|
+ else if (length == 13 && message[offset] == MSG_SET_WINDOW_LOC)
|
84
|
{
|
85
|
int idx = offset + 1;
|
86
|
|
87
|
int windowId = readMessageInt32(message, idx);
|
88
|
idx = idx + 4;
|
89
|
|
90
|
- int x = readMessageInt16(message, idx);
|
91
|
- idx = idx + 2;
|
92
|
+ int x = readMessageInt32(message, idx);
|
93
|
+ idx = idx + 4;
|
94
|
|
95
|
- int y = readMessageInt16(message, idx);
|
96
|
- idx = idx + 2;
|
97
|
+ int y = readMessageInt32(message, idx);
|
98
|
+ idx = idx + 4;
|
99
|
|
100
|
this.callbacks.setWindowLocation(windowId, x, y);
|
101
|
|
102
|
@@ -1391,18 +1393,18 @@
|
103
|
|
104
|
this.callbacks.windowIconified(windowId, state);
|
105
|
}
|
106
|
- else if (length == 13 && message[offset] == MSG_WINDOW_RESIZED)
|
107
|
+ else if (length == 17 && message[offset] == MSG_WINDOW_RESIZED)
|
108
|
{
|
109
|
int idx = offset + 1;
|
110
|
|
111
|
int windowId = readMessageInt32(message, idx);
|
112
|
idx = idx + 4;
|
113
|
|
114
|
- int y = readMessageInt16(message, idx);
|
115
|
- idx = idx + 2;
|
116
|
+ int y = readMessageInt32(message, idx);
|
117
|
+ idx = idx + 4;
|
118
|
|
119
|
- int x = readMessageInt16(message, idx);
|
120
|
- idx = idx + 2;
|
121
|
+ int x = readMessageInt32(message, idx);
|
122
|
+ idx = idx + 4;
|
123
|
|
124
|
int width = readMessageInt16(message, idx);
|
125
|
idx = idx + 2;
|
126
|
|