@raydiant/playlist-window-manager 0.0.0-test-3 → 0.0.0-test-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -102,6 +102,7 @@ var BrowserViewRenderer = /** @class */ (function () {
|
|
|
102
102
|
this.offscreenWindow.addBrowserView(window.view);
|
|
103
103
|
logger.info("playlist-window-manager/src/BrowserViewRenderer.ts createWindow2 ".concat(JSON.stringify(window.bounds)));
|
|
104
104
|
window.view.setBounds(window.bounds);
|
|
105
|
+
logger.info("playlist-window-manager/src/BrowserViewRenderer.ts createWindow3 ".concat(JSON.stringify(window.view.getBounds())));
|
|
105
106
|
if (backgroundColor) {
|
|
106
107
|
window.view.setBackgroundColor(backgroundColor);
|
|
107
108
|
}
|
|
@@ -94,7 +94,21 @@ var BrowserWindowRenderer = /** @class */ (function () {
|
|
|
94
94
|
});
|
|
95
95
|
this.proxySettings = null;
|
|
96
96
|
opts.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts constructor1 ".concat(JSON.stringify(opts.bounds)));
|
|
97
|
-
|
|
97
|
+
// TODO zlv commented out
|
|
98
|
+
// this.offscreenWindow.setBounds(opts.bounds);
|
|
99
|
+
// TODO zlv added
|
|
100
|
+
this.offscreenWindow.setContentBounds(opts.bounds);
|
|
101
|
+
opts.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts constructor2 ".concat(JSON.stringify({
|
|
102
|
+
bounds: this.offscreenWindow.getBounds(),
|
|
103
|
+
normalBounds: this.offscreenWindow.getNormalBounds(),
|
|
104
|
+
contentBounds: this.offscreenWindow.getContentBounds(),
|
|
105
|
+
})));
|
|
106
|
+
this.offscreenWindow.maximize(); // TODO zlv added
|
|
107
|
+
opts.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts constructor3 ".concat(JSON.stringify({
|
|
108
|
+
bounds: this.offscreenWindow.getBounds(),
|
|
109
|
+
normalBounds: this.offscreenWindow.getNormalBounds(),
|
|
110
|
+
contentBounds: this.offscreenWindow.getContentBounds(),
|
|
111
|
+
})));
|
|
98
112
|
if (opts.proxySettings) {
|
|
99
113
|
this.proxySettings = opts.proxySettings;
|
|
100
114
|
}
|
|
@@ -166,6 +180,11 @@ var BrowserWindowRenderer = /** @class */ (function () {
|
|
|
166
180
|
window.view.webContents.on('unresponsive', window.unresponsiveCallback);
|
|
167
181
|
if (window.view instanceof electron_1.BrowserView) {
|
|
168
182
|
this.moveWindowOffscreen(window);
|
|
183
|
+
this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow2: ".concat(JSON.stringify({
|
|
184
|
+
bounds: this.offscreenWindow.getBounds(),
|
|
185
|
+
normalBounds: this.offscreenWindow.getNormalBounds(),
|
|
186
|
+
contentBounds: this.offscreenWindow.getContentBounds(),
|
|
187
|
+
})));
|
|
169
188
|
}
|
|
170
189
|
this.windows[windowId] = window;
|
|
171
190
|
// Listen for messages from window.
|
|
@@ -175,8 +194,15 @@ var BrowserWindowRenderer = /** @class */ (function () {
|
|
|
175
194
|
// Electron issue: https://github.com/electron/electron/issues/20357
|
|
176
195
|
window.view.setBackgroundColor(backgroundColor === 'transparent' ? '#00000000' : backgroundColor);
|
|
177
196
|
}
|
|
178
|
-
|
|
179
|
-
|
|
197
|
+
if (window.view instanceof electron_1.BrowserWindow) {
|
|
198
|
+
this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow3: ".concat(JSON.stringify(window.bounds)));
|
|
199
|
+
window.view.setContentBounds(window.bounds);
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow4: ".concat(JSON.stringify(window.bounds)));
|
|
203
|
+
window.view.setBounds(window.bounds);
|
|
204
|
+
}
|
|
205
|
+
this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow5: ".concat(JSON.stringify(window.view.getBounds())));
|
|
180
206
|
if (!this.proxySettings) return [3 /*break*/, 2];
|
|
181
207
|
return [4 /*yield*/, window.view.webContents.session.setProxy(this.proxySettings)];
|
|
182
208
|
case 1:
|
|
@@ -220,11 +246,24 @@ var BrowserWindowRenderer = /** @class */ (function () {
|
|
|
220
246
|
this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts updateWindowBounds2: ".concat(JSON.stringify(__assign(__assign({}, window.bounds), { x: window.bounds.x + this.opts.bounds.x, y: window.bounds.y + this.opts.bounds.y }))));
|
|
221
247
|
// Child BrowserWindows are absolutely positioned so we need to add the main windows
|
|
222
248
|
// x/y to when updating the child window's bounds.
|
|
223
|
-
|
|
249
|
+
// TODO zlv commented out
|
|
250
|
+
// window.view.setBounds({
|
|
251
|
+
// ...window.bounds,
|
|
252
|
+
// x: window.bounds.x + this.opts.bounds.x,
|
|
253
|
+
// y: window.bounds.y + this.opts.bounds.y,
|
|
254
|
+
// });
|
|
255
|
+
// TODO zlv added
|
|
256
|
+
window.view.setContentBounds(__assign(__assign({}, window.bounds), { x: window.bounds.x + this.opts.bounds.x, y: window.bounds.y + this.opts.bounds.y }));
|
|
257
|
+
this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts updateWindowBounds3: ".concat(JSON.stringify({
|
|
258
|
+
bounds: window.view.getBounds(),
|
|
259
|
+
normalBounds: window.view.getNormalBounds(),
|
|
260
|
+
contentBounds: window.view.getContentBounds(),
|
|
261
|
+
})));
|
|
224
262
|
}
|
|
225
263
|
else {
|
|
226
|
-
this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts
|
|
264
|
+
this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts updateWindowBounds4: ".concat(JSON.stringify(window.bounds)));
|
|
227
265
|
window.view.setBounds(window.bounds);
|
|
266
|
+
this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts updateWindowBounds5: ".concat(JSON.stringify(window.view.getBounds())));
|
|
228
267
|
}
|
|
229
268
|
};
|
|
230
269
|
BrowserWindowRenderer.prototype.showWindow = function (windowId, isFocused) {
|
package/package.json
CHANGED
|
@@ -70,8 +70,12 @@ export default class BrowserViewRenderer implements PresentationWindowRenderer {
|
|
|
70
70
|
window.bounds
|
|
71
71
|
)}`
|
|
72
72
|
);
|
|
73
|
-
|
|
74
73
|
window.view.setBounds(window.bounds);
|
|
74
|
+
logger.info(
|
|
75
|
+
`playlist-window-manager/src/BrowserViewRenderer.ts createWindow3 ${JSON.stringify(
|
|
76
|
+
window.view.getBounds()
|
|
77
|
+
)}`
|
|
78
|
+
);
|
|
75
79
|
|
|
76
80
|
if (backgroundColor) {
|
|
77
81
|
window.view.setBackgroundColor(backgroundColor);
|
|
@@ -77,7 +77,29 @@ export default class BrowserWindowRenderer
|
|
|
77
77
|
opts.bounds
|
|
78
78
|
)}`
|
|
79
79
|
);
|
|
80
|
-
|
|
80
|
+
// TODO zlv commented out
|
|
81
|
+
// this.offscreenWindow.setBounds(opts.bounds);
|
|
82
|
+
// TODO zlv added
|
|
83
|
+
this.offscreenWindow.setContentBounds(opts.bounds);
|
|
84
|
+
opts.logger.info(
|
|
85
|
+
`playlist-window-manager/src/BrowserWindowRenderer.ts constructor2 ${JSON.stringify(
|
|
86
|
+
{
|
|
87
|
+
bounds: this.offscreenWindow.getBounds(),
|
|
88
|
+
normalBounds: this.offscreenWindow.getNormalBounds(),
|
|
89
|
+
contentBounds: this.offscreenWindow.getContentBounds(),
|
|
90
|
+
}
|
|
91
|
+
)}`
|
|
92
|
+
);
|
|
93
|
+
this.offscreenWindow.maximize(); // TODO zlv added
|
|
94
|
+
opts.logger.info(
|
|
95
|
+
`playlist-window-manager/src/BrowserWindowRenderer.ts constructor3 ${JSON.stringify(
|
|
96
|
+
{
|
|
97
|
+
bounds: this.offscreenWindow.getBounds(),
|
|
98
|
+
normalBounds: this.offscreenWindow.getNormalBounds(),
|
|
99
|
+
contentBounds: this.offscreenWindow.getContentBounds(),
|
|
100
|
+
}
|
|
101
|
+
)}`
|
|
102
|
+
);
|
|
81
103
|
if (opts.proxySettings) {
|
|
82
104
|
this.proxySettings = opts.proxySettings;
|
|
83
105
|
}
|
|
@@ -193,6 +215,15 @@ export default class BrowserWindowRenderer
|
|
|
193
215
|
|
|
194
216
|
if (window.view instanceof BrowserView) {
|
|
195
217
|
this.moveWindowOffscreen(window);
|
|
218
|
+
this.logger.info(
|
|
219
|
+
`playlist-window-manager/src/BrowserWindowRenderer.ts createWindow2: ${JSON.stringify(
|
|
220
|
+
{
|
|
221
|
+
bounds: this.offscreenWindow.getBounds(),
|
|
222
|
+
normalBounds: this.offscreenWindow.getNormalBounds(),
|
|
223
|
+
contentBounds: this.offscreenWindow.getContentBounds(),
|
|
224
|
+
}
|
|
225
|
+
)}`
|
|
226
|
+
);
|
|
196
227
|
}
|
|
197
228
|
|
|
198
229
|
this.windows[windowId] = window;
|
|
@@ -207,12 +238,26 @@ export default class BrowserWindowRenderer
|
|
|
207
238
|
);
|
|
208
239
|
}
|
|
209
240
|
|
|
241
|
+
if (window.view instanceof BrowserWindow) {
|
|
242
|
+
this.logger.info(
|
|
243
|
+
`playlist-window-manager/src/BrowserWindowRenderer.ts createWindow3: ${JSON.stringify(
|
|
244
|
+
window.bounds
|
|
245
|
+
)}`
|
|
246
|
+
);
|
|
247
|
+
window.view.setContentBounds(window.bounds);
|
|
248
|
+
} else {
|
|
249
|
+
this.logger.info(
|
|
250
|
+
`playlist-window-manager/src/BrowserWindowRenderer.ts createWindow4: ${JSON.stringify(
|
|
251
|
+
window.bounds
|
|
252
|
+
)}`
|
|
253
|
+
);
|
|
254
|
+
window.view.setBounds(window.bounds);
|
|
255
|
+
}
|
|
210
256
|
this.logger.info(
|
|
211
|
-
`playlist-window-manager/src/BrowserWindowRenderer.ts
|
|
212
|
-
window.
|
|
257
|
+
`playlist-window-manager/src/BrowserWindowRenderer.ts createWindow5: ${JSON.stringify(
|
|
258
|
+
window.view.getBounds()
|
|
213
259
|
)}`
|
|
214
260
|
);
|
|
215
|
-
window.view.setBounds(window.bounds);
|
|
216
261
|
|
|
217
262
|
if (this.proxySettings) {
|
|
218
263
|
await window.view.webContents.session.setProxy(this.proxySettings);
|
|
@@ -261,18 +306,40 @@ export default class BrowserWindowRenderer
|
|
|
261
306
|
|
|
262
307
|
// Child BrowserWindows are absolutely positioned so we need to add the main windows
|
|
263
308
|
// x/y to when updating the child window's bounds.
|
|
264
|
-
|
|
309
|
+
// TODO zlv commented out
|
|
310
|
+
// window.view.setBounds({
|
|
311
|
+
// ...window.bounds,
|
|
312
|
+
// x: window.bounds.x + this.opts.bounds.x,
|
|
313
|
+
// y: window.bounds.y + this.opts.bounds.y,
|
|
314
|
+
// });
|
|
315
|
+
// TODO zlv added
|
|
316
|
+
window.view.setContentBounds({
|
|
265
317
|
...window.bounds,
|
|
266
318
|
x: window.bounds.x + this.opts.bounds.x,
|
|
267
319
|
y: window.bounds.y + this.opts.bounds.y,
|
|
268
320
|
});
|
|
269
|
-
|
|
321
|
+
|
|
270
322
|
this.logger.info(
|
|
271
323
|
`playlist-window-manager/src/BrowserWindowRenderer.ts updateWindowBounds3: ${JSON.stringify(
|
|
324
|
+
{
|
|
325
|
+
bounds: window.view.getBounds(),
|
|
326
|
+
normalBounds: window.view.getNormalBounds(),
|
|
327
|
+
contentBounds: window.view.getContentBounds(),
|
|
328
|
+
}
|
|
329
|
+
)}`
|
|
330
|
+
);
|
|
331
|
+
} else {
|
|
332
|
+
this.logger.info(
|
|
333
|
+
`playlist-window-manager/src/BrowserWindowRenderer.ts updateWindowBounds4: ${JSON.stringify(
|
|
272
334
|
window.bounds
|
|
273
335
|
)}`
|
|
274
336
|
);
|
|
275
337
|
window.view.setBounds(window.bounds);
|
|
338
|
+
this.logger.info(
|
|
339
|
+
`playlist-window-manager/src/BrowserWindowRenderer.ts updateWindowBounds5: ${JSON.stringify(
|
|
340
|
+
window.view.getBounds()
|
|
341
|
+
)}`
|
|
342
|
+
);
|
|
276
343
|
}
|
|
277
344
|
}
|
|
278
345
|
|