Skip to content

Commit 315c7af

Browse files
committed
fix: 修复mac下,窗口最大化后,调用截图,程序崩溃问题 nashaofu#177
1 parent a3fea3d commit 315c7af

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/electron-screenshots/src/screenshots.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,13 @@ export default class Screenshots extends Events {
165165
show: false,
166166
autoHideMenuBar: true,
167167
transparent: true,
168-
// mac resizable 设置为 false 会导致页面崩溃
168+
// mac resizable 设置为 true 会导致页面崩溃
169169
resizable: process.platform !== 'darwin',
170170
movable: false,
171-
// focusable: true, 否则窗口不能及时响应esc按键,输入框也不能输入
171+
// focusable 鼻血设置为 true, 否则窗口不能及时响应esc按键,输入框也不能输入
172172
focusable: true,
173+
// mac fullscreenable 设置为 true 会导致页面崩溃
174+
fullscreenable: process.platform !== 'darwin',
173175
/**
174176
* linux 下必须设置为false,否则不能全屏显示在最上层
175177
* mac 下设置为false,否则可能会导致程序坞不恢复问题

screenshots.code-workspace

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"path": "."
55
},
66
{
7-
"path": "packages/react-screenshots"
7+
"path": "packages/electron-screenshots"
88
},
99
{
10-
"path": "packages/electron-screenshots"
10+
"path": "packages/react-screenshots"
1111
}
1212
],
1313
"settings": {}

0 commit comments

Comments
 (0)