@raydiant/playlist-window-manager 0.0.0-test-10 → 0.0.0-test-11

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.
@@ -190,9 +190,35 @@ var BrowserWindowRenderer = /** @class */ (function () {
190
190
  // Electron issue: https://github.com/electron/electron/issues/20357
191
191
  window.view.setBackgroundColor(backgroundColor === 'transparent' ? '#00000000' : backgroundColor);
192
192
  }
193
- this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow4: ".concat(JSON.stringify(window.bounds)));
193
+ if (window.view instanceof electron_1.BrowserWindow) {
194
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow4: ".concat(JSON.stringify({
195
+ newBounds: window.bounds,
196
+ fullscreen: window.view.isFullScreen(),
197
+ bounds: window.view.getBounds(),
198
+ contentBounds: window.view.getContentBounds(),
199
+ normalBounds: window.view.getNormalBounds(),
200
+ })));
201
+ }
202
+ else {
203
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow5: ".concat(JSON.stringify({
204
+ newBounds: window.bounds,
205
+ bounds: window.view.getBounds(),
206
+ })));
207
+ }
194
208
  this.setWindowOrViewBounds(window.view, window.bounds);
195
- this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow7: ".concat(JSON.stringify(window.view.getBounds())));
209
+ if (window.view instanceof electron_1.BrowserWindow) {
210
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow7: ".concat(JSON.stringify({
211
+ fullscreen: window.view.isFullScreen(),
212
+ bounds: window.view.getBounds(),
213
+ contentBounds: window.view.getContentBounds(),
214
+ normalBounds: window.view.getNormalBounds(),
215
+ })));
216
+ }
217
+ else {
218
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow8: ".concat(JSON.stringify({
219
+ bounds: window.view.getBounds(),
220
+ })));
221
+ }
196
222
  if (!this.proxySettings) return [3 /*break*/, 2];
197
223
  return [4 /*yield*/, window.view.webContents.session.setProxy(this.proxySettings)];
198
224
  case 1:
@@ -444,6 +470,13 @@ var BrowserWindowRenderer = /** @class */ (function () {
444
470
  this.browserWindowPool.add(browserWindow);
445
471
  }
446
472
  }
473
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createOrGetPooledBrowserWindow1: ".concat(JSON.stringify({
474
+ screen: electron_1.screen.getPrimaryDisplay().bounds,
475
+ fullscreen: browserWindow.isFullScreen(),
476
+ bounds: browserWindow.getBounds(),
477
+ contentBounds: browserWindow.getContentBounds(),
478
+ normalBounds: browserWindow.getNormalBounds(),
479
+ })));
447
480
  return browserWindow;
448
481
  };
449
482
  BrowserWindowRenderer.prototype.destroyOrUnloadPooledBrowserWindow = function (windowId, browserWindow) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raydiant/playlist-window-manager",
3
- "version": "0.0.0-test-10",
3
+ "version": "0.0.0-test-11",
4
4
  "description": "Window manager for playlist playback.",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -3,6 +3,7 @@ import {
3
3
  BrowserWindow,
4
4
  BrowserView,
5
5
  ipcMain,
6
+ screen,
6
7
  IpcMainEvent,
7
8
  Event,
8
9
  Details,
@@ -231,17 +232,49 @@ export default class BrowserWindowRenderer
231
232
  );
232
233
  }
233
234
 
234
- this.logger.info(
235
- `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow4: ${JSON.stringify(
236
- window.bounds
237
- )}`
238
- );
235
+ if (window.view instanceof BrowserWindow) {
236
+ this.logger.info(
237
+ `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow4: ${JSON.stringify(
238
+ {
239
+ newBounds: window.bounds,
240
+ fullscreen: window.view.isFullScreen(),
241
+ bounds: window.view.getBounds(),
242
+ contentBounds: window.view.getContentBounds(),
243
+ normalBounds: window.view.getNormalBounds(),
244
+ }
245
+ )}`
246
+ );
247
+ } else {
248
+ this.logger.info(
249
+ `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow5: ${JSON.stringify(
250
+ {
251
+ newBounds: window.bounds,
252
+ bounds: window.view.getBounds(),
253
+ }
254
+ )}`
255
+ );
256
+ }
239
257
  this.setWindowOrViewBounds(window.view, window.bounds);
240
- this.logger.info(
241
- `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow7: ${JSON.stringify(
242
- window.view.getBounds()
243
- )}`
244
- );
258
+ if (window.view instanceof BrowserWindow) {
259
+ this.logger.info(
260
+ `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow7: ${JSON.stringify(
261
+ {
262
+ fullscreen: window.view.isFullScreen(),
263
+ bounds: window.view.getBounds(),
264
+ contentBounds: window.view.getContentBounds(),
265
+ normalBounds: window.view.getNormalBounds(),
266
+ }
267
+ )}`
268
+ );
269
+ } else {
270
+ this.logger.info(
271
+ `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow8: ${JSON.stringify(
272
+ {
273
+ bounds: window.view.getBounds(),
274
+ }
275
+ )}`
276
+ );
277
+ }
245
278
 
246
279
  if (this.proxySettings) {
247
280
  await window.view.webContents.session.setProxy(this.proxySettings);
@@ -563,6 +596,18 @@ export default class BrowserWindowRenderer
563
596
  }
564
597
  }
565
598
 
599
+ this.logger.info(
600
+ `playlist-window-manager/src/BrowserWindowRenderer.ts createOrGetPooledBrowserWindow1: ${JSON.stringify(
601
+ {
602
+ screen: screen.getPrimaryDisplay().bounds,
603
+ fullscreen: browserWindow.isFullScreen(),
604
+ bounds: browserWindow.getBounds(),
605
+ contentBounds: browserWindow.getContentBounds(),
606
+ normalBounds: browserWindow.getNormalBounds(),
607
+ }
608
+ )}`
609
+ );
610
+
566
611
  return browserWindow;
567
612
  }
568
613