electron-screenshots 0.5.10 → 0.5.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.
Files changed (2) hide show
  1. package/lib/screenshots.js +14 -9
  2. package/package.json +2 -2
@@ -153,7 +153,6 @@ var Screenshots = /** @class */ (function (_super) {
153
153
  }
154
154
  // 先清除 Kiosk 模式,然后取消全屏才有效
155
155
  this.$win.setKiosk(false);
156
- this.$win.setFullScreen(false);
157
156
  this.$win.setSimpleFullScreen(false);
158
157
  this.$win.blur();
159
158
  this.$win.blurWebView();
@@ -243,9 +242,12 @@ var Screenshots = /** @class */ (function (_super) {
243
242
  movable: false,
244
243
  // focusable: true, 否则窗口不能及时响应esc按键,输入框也不能输入
245
244
  focusable: true,
246
- // linux 下必须设置为false,否则不能全屏显示在最上层
247
- // mac 下设置为true,鼠标移动到屏幕上方菜单栏处,才不会唤出菜单栏
248
- fullscreen: process.platform === 'darwin',
245
+ /**
246
+ * linux 下必须设置为false,否则不能全屏显示在最上层
247
+ * mac 下设置为false,否则可能会导致程序坞不恢复问题
248
+ * https://github.com/nashaofu/screenshots/issues/148
249
+ */
250
+ // fullscreen: process.platform === 'darwin',
249
251
  // 设为true 防止mac新开一个桌面,影响效果
250
252
  simpleFullscreen: process.platform === 'darwin',
251
253
  backgroundColor: '#00000000',
@@ -260,9 +262,11 @@ var Screenshots = /** @class */ (function (_super) {
260
262
  this.$win.on('show', function () {
261
263
  var _a, _b;
262
264
  (_a = _this.$win) === null || _a === void 0 ? void 0 : _a.focus();
263
- // 在窗口显示时设置,防止与 fullscreen、x、y、width、height 等冲突
264
- // 导致显示效果不符合预期
265
- (_b = _this.$win) === null || _b === void 0 ? void 0 : _b.setKiosk(true);
265
+ /**
266
+ * 在窗口显示时设置,防止与 fullscreen、x、y、width、height 等冲突, 导致显示效果不符合预期
267
+ * mac 下不设置 kiosk 模式,https://github.com/nashaofu/screenshots/issues/148
268
+ */
269
+ (_b = _this.$win) === null || _b === void 0 ? void 0 : _b.setKiosk(process.platform !== 'darwin');
266
270
  });
267
271
  this.$win.on('closed', function () {
268
272
  _this.$win = null;
@@ -281,8 +285,9 @@ var Screenshots = /** @class */ (function (_super) {
281
285
  }
282
286
  this.$win.blur();
283
287
  this.$win.setKiosk(false);
284
- this.$win.setFullScreen(process.platform === 'darwin');
285
- this.$win.setSimpleFullScreen(process.platform === 'darwin');
288
+ if (process.platform === 'darwin') {
289
+ this.$win.setSimpleFullScreen(true);
290
+ }
286
291
  this.$win.setBounds(display);
287
292
  this.$view.setBounds({
288
293
  x: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-screenshots",
3
- "version": "0.5.10",
3
+ "version": "0.5.11",
4
4
  "description": "electron 截图插件",
5
5
  "types": "lib/screenshots.d.ts",
6
6
  "main": "lib/screenshots.js",
@@ -58,5 +58,5 @@
58
58
  "rimraf": "^3.0.2",
59
59
  "typescript": "^4.5.5"
60
60
  },
61
- "gitHead": "90fb59ef5762b7ba13712ccc1acbd6ca8b8469a2"
61
+ "gitHead": "344628b8e5d6ec0eba886954c39c5ce6a465f5f1"
62
62
  }