@raydiant/playlist-window-manager 0.0.0-test29 → 0.0.0-test31

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.
@@ -69,6 +69,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
69
69
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
70
70
  }
71
71
  };
72
+ var __rest = (this && this.__rest) || function (s, e) {
73
+ var t = {};
74
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
75
+ t[p] = s[p];
76
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
77
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
78
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
79
+ t[p[i]] = s[p[i]];
80
+ }
81
+ return t;
82
+ };
72
83
  var __importDefault = (this && this.__importDefault) || function (mod) {
73
84
  return (mod && mod.__esModule) ? mod : { "default": mod };
74
85
  };
@@ -87,6 +98,7 @@ var BrowserWindowRenderer = /** @class */ (function () {
87
98
  this.offscreenWindow = new electron_1.BrowserWindow({
88
99
  show: false,
89
100
  frame: this.opts.frame,
101
+ fullscreen: this.opts.fullscreen,
90
102
  hasShadow: this.opts.hasShadow,
91
103
  webPreferences: {
92
104
  preload: path.join(__dirname, 'preload.js'),
@@ -94,6 +106,12 @@ var BrowserWindowRenderer = /** @class */ (function () {
94
106
  },
95
107
  });
96
108
  this.proxySettings = null;
109
+ opts.logger.info("offscreenWindow = new BrowserWindow(".concat(JSON.stringify({
110
+ show: false,
111
+ frame: this.opts.frame,
112
+ fullscreen: this.opts.fullscreen,
113
+ hasShadow: this.opts.hasShadow,
114
+ }), ")"));
97
115
  if (!opts.fullscreen) {
98
116
  this.offscreenWindow.setBounds(opts.bounds);
99
117
  }
@@ -113,6 +131,13 @@ var BrowserWindowRenderer = /** @class */ (function () {
113
131
  return __generator(this, function (_c) {
114
132
  switch (_c.label) {
115
133
  case 0:
134
+ this.logger.info("BrowserWindowRenderer.createWindow(".concat(JSON.stringify({
135
+ windowId: windowId,
136
+ parentWindowId: parentWindowId,
137
+ bounds: bounds,
138
+ }), ")"));
139
+ this.logger.info("BrowserWindowRenderer.createWindow adjust bounds: ".concat(parentWindowId && !this.opts.renderChildWindowsAsBrowserViews, ". New Bounds ").concat(JSON.stringify(parentWindowId && !this.opts.renderChildWindowsAsBrowserViews
140
+ ? __assign(__assign({}, bounds), { x: bounds.x + this.opts.bounds.x, y: bounds.y + this.opts.bounds.y }) : bounds), "\n "));
116
141
  window = {
117
142
  parentWindowId: parentWindowId,
118
143
  // If we are creating a child window and renderChildWindowsAsBrowserViews is true,
@@ -400,6 +425,10 @@ var BrowserWindowRenderer = /** @class */ (function () {
400
425
  }
401
426
  }
402
427
  if (!browserWindow) {
428
+ // TODO remove
429
+ var parent_1 = options.parent, webPreferences = options.webPreferences, rest = __rest(options, ["parent", "webPreferences"]);
430
+ var newOptions = __assign(__assign({}, rest), { parentId: parent_1 === null || parent_1 === void 0 ? void 0 : parent_1.id });
431
+ this.logger.info("BrowserWindowRenderer.createOrGetPooledBrowserWindow, new BrowserWindow(".concat(JSON.stringify(newOptions), ")"));
403
432
  browserWindow = new electron_1.BrowserWindow(options);
404
433
  if (this.opts.useWindowPool) {
405
434
  this.browserWindowPool.add(browserWindow);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raydiant/playlist-window-manager",
3
- "version": "0.0.0-test29",
3
+ "version": "0.0.0-test31",
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
  private offscreenWindow = new BrowserWindow({
66
66
  show: false,
67
67
  frame: this.opts.frame,
68
+ fullscreen: this.opts.fullscreen,
68
69
  hasShadow: this.opts.hasShadow,
69
70
  webPreferences: {
70
71
  preload: path.join(__dirname, 'preload.js'),
@@ -77,6 +78,14 @@ export default class BrowserWindowRenderer
77
78
  private logger: Logger;
78
79
 
79
80
  constructor(private opts: BrowserWindowRendererOptions) {
81
+ opts.logger.info(
82
+ `offscreenWindow = new BrowserWindow(${JSON.stringify({
83
+ show: false,
84
+ frame: this.opts.frame,
85
+ fullscreen: this.opts.fullscreen,
86
+ hasShadow: this.opts.hasShadow,
87
+ })})`
88
+ );
80
89
  if (!opts.fullscreen) {
81
90
  this.offscreenWindow.setBounds(opts.bounds);
82
91
  }
@@ -99,6 +108,28 @@ export default class BrowserWindowRenderer
99
108
  receiveMessageCallback,
100
109
  errorCallback,
101
110
  }: CreateWindowOptions) {
111
+ this.logger.info(
112
+ `BrowserWindowRenderer.createWindow(${JSON.stringify({
113
+ windowId,
114
+ parentWindowId,
115
+ bounds,
116
+ })})`
117
+ );
118
+ this.logger.info(
119
+ `BrowserWindowRenderer.createWindow adjust bounds: ${
120
+ parentWindowId && !this.opts.renderChildWindowsAsBrowserViews
121
+ }. New Bounds ${JSON.stringify(
122
+ parentWindowId && !this.opts.renderChildWindowsAsBrowserViews
123
+ ? {
124
+ ...bounds,
125
+ x: bounds.x + this.opts.bounds.x,
126
+ y: bounds.y + this.opts.bounds.y,
127
+ }
128
+ : bounds
129
+ )}
130
+ `
131
+ );
132
+
102
133
  const window: BrowserWindowRendererWindow = {
103
134
  parentWindowId,
104
135
  // If we are creating a child window and renderChildWindowsAsBrowserViews is true,
@@ -469,6 +500,15 @@ export default class BrowserWindowRenderer
469
500
  }
470
501
 
471
502
  if (!browserWindow) {
503
+ // TODO remove
504
+ const { parent, webPreferences, ...rest } = options;
505
+ const newOptions = { ...rest, parentId: parent?.id };
506
+ this.logger.info(
507
+ `BrowserWindowRenderer.createOrGetPooledBrowserWindow, new BrowserWindow(${JSON.stringify(
508
+ newOptions
509
+ )})`
510
+ );
511
+
472
512
  browserWindow = new BrowserWindow(options);
473
513
  if (this.opts.useWindowPool) {
474
514
  this.browserWindowPool.add(browserWindow);