@raydiant/playlist-window-manager 0.0.0-test-16 → 0.0.0-test-19

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.
@@ -85,7 +85,7 @@ var BrowserWindowRenderer = /** @class */ (function () {
85
85
  this.browserWindowPool = new WindowPool();
86
86
  this.browserViewPool = new WindowPool();
87
87
  // Create a hidden window to preload BrowserViews.
88
- this.offscreenWindow = new electron_1.BrowserWindow(__assign(__assign({}, this.opts.bounds), { show: false, frame: this.opts.frame, hasShadow: this.opts.hasShadow, fullscreen: (0, boundUtils_1.isFullscreen)(this.opts.bounds), webPreferences: {
88
+ this.offscreenWindow = new electron_1.BrowserWindow(__assign(__assign({}, this.opts.bounds), { show: false, frame: this.opts.frame, hasShadow: this.opts.hasShadow, useContentSize: true, fullscreen: (0, boundUtils_1.isFullscreen)(this.opts.bounds), webPreferences: {
89
89
  preload: path.join(__dirname, 'preload.js'),
90
90
  } }));
91
91
  this.proxySettings = null;
@@ -272,11 +272,27 @@ var BrowserWindowRenderer = /** @class */ (function () {
272
272
  }
273
273
  };
274
274
  BrowserWindowRenderer.prototype.showWindow = function (windowId, isFocused) {
275
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts showWindow1");
275
276
  var window = this.getWindow(windowId);
276
277
  if (!window) {
277
278
  throw new Error("Failed to show window, missing window id '".concat(windowId, "'"));
278
279
  }
279
280
  if (window.view instanceof electron_1.BrowserWindow) {
281
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts showWindow2: ".concat(JSON.stringify({
282
+ fullscreen: window.view.isFullScreen(),
283
+ bounds: window.view.getBounds(),
284
+ normalBounds: window.view.getNormalBounds(),
285
+ contentBounds: window.view.getContentBounds(),
286
+ })));
287
+ if (window.view.isFullScreen()) {
288
+ window.view.maximize();
289
+ }
290
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts showWindow3: ".concat(JSON.stringify({
291
+ fullscreen: window.view.isFullScreen(),
292
+ bounds: window.view.getBounds(),
293
+ normalBounds: window.view.getNormalBounds(),
294
+ contentBounds: window.view.getContentBounds(),
295
+ })));
280
296
  if (isFocused) {
281
297
  window.view.show();
282
298
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raydiant/playlist-window-manager",
3
- "version": "0.0.0-test-16",
3
+ "version": "0.0.0-test-19",
4
4
  "description": "Window manager for playlist playback.",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -65,6 +65,7 @@ export default class BrowserWindowRenderer
65
65
  show: false,
66
66
  frame: this.opts.frame,
67
67
  hasShadow: this.opts.hasShadow,
68
+ useContentSize: true,
68
69
  fullscreen: isFullscreen(this.opts.bounds),
69
70
  webPreferences: {
70
71
  preload: path.join(__dirname, 'preload.js'),
@@ -351,12 +352,38 @@ export default class BrowserWindowRenderer
351
352
  }
352
353
 
353
354
  public showWindow(windowId: string, isFocused: boolean) {
355
+ this.logger.info(
356
+ `playlist-window-manager/src/BrowserWindowRenderer.ts showWindow1`
357
+ );
354
358
  const window = this.getWindow(windowId);
355
359
  if (!window) {
356
360
  throw new Error(`Failed to show window, missing window id '${windowId}'`);
357
361
  }
358
362
 
359
363
  if (window.view instanceof BrowserWindow) {
364
+ this.logger.info(
365
+ `playlist-window-manager/src/BrowserWindowRenderer.ts showWindow2: ${JSON.stringify(
366
+ {
367
+ fullscreen: window.view.isFullScreen(),
368
+ bounds: window.view.getBounds(),
369
+ normalBounds: window.view.getNormalBounds(),
370
+ contentBounds: window.view.getContentBounds(),
371
+ }
372
+ )}`
373
+ );
374
+ if (window.view.isFullScreen()) {
375
+ window.view.maximize();
376
+ }
377
+ this.logger.info(
378
+ `playlist-window-manager/src/BrowserWindowRenderer.ts showWindow3: ${JSON.stringify(
379
+ {
380
+ fullscreen: window.view.isFullScreen(),
381
+ bounds: window.view.getBounds(),
382
+ normalBounds: window.view.getNormalBounds(),
383
+ contentBounds: window.view.getContentBounds(),
384
+ }
385
+ )}`
386
+ );
360
387
  if (isFocused) {
361
388
  window.view.show();
362
389
  } else {