Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
2e94e43a
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2e94e43a
编写于
1月 28, 2020
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix #89317
上级
405eeab2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
5 addition
and
25 deletion
+5
-25
src/vs/platform/electron/electron-main/electronMainService.ts
...vs/platform/electron/electron-main/electronMainService.ts
+0
-9
src/vs/platform/electron/node/electron.ts
src/vs/platform/electron/node/electron.ts
+0
-1
src/vs/workbench/services/host/electron-browser/desktopHostService.ts
...ench/services/host/electron-browser/desktopHostService.ts
+5
-14
src/vs/workbench/test/workbenchTestServices.ts
src/vs/workbench/test/workbenchTestServices.ts
+0
-1
未找到文件。
src/vs/platform/electron/electron-main/electronMainService.ts
浏览文件 @
2e94e43a
...
@@ -157,15 +157,6 @@ export class ElectronMainService implements IElectronMainService {
...
@@ -157,15 +157,6 @@ export class ElectronMainService implements IElectronMainService {
}
}
}
}
async
isWindowFocused
(
windowId
:
number
|
undefined
):
Promise
<
boolean
>
{
const
window
=
this
.
windowById
(
windowId
);
if
(
window
)
{
return
window
.
win
.
isFocused
();
}
return
false
;
}
async
focusWindow
(
windowId
:
number
|
undefined
,
options
?:
{
windowId
?:
number
;
}):
Promise
<
void
>
{
async
focusWindow
(
windowId
:
number
|
undefined
,
options
?:
{
windowId
?:
number
;
}):
Promise
<
void
>
{
if
(
options
&&
typeof
options
.
windowId
===
'
number
'
)
{
if
(
options
&&
typeof
options
.
windowId
===
'
number
'
)
{
windowId
=
options
.
windowId
;
windowId
=
options
.
windowId
;
...
...
src/vs/platform/electron/node/electron.ts
浏览文件 @
2e94e43a
...
@@ -43,7 +43,6 @@ export interface IElectronService {
...
@@ -43,7 +43,6 @@ export interface IElectronService {
unmaximizeWindow
():
Promise
<
void
>
;
unmaximizeWindow
():
Promise
<
void
>
;
minimizeWindow
():
Promise
<
void
>
;
minimizeWindow
():
Promise
<
void
>
;
isWindowFocused
():
Promise
<
boolean
>
;
focusWindow
(
options
?:
{
windowId
?:
number
}):
Promise
<
void
>
;
focusWindow
(
options
?:
{
windowId
?:
number
}):
Promise
<
void
>
;
// Dialogs
// Dialogs
...
...
src/vs/workbench/services/host/electron-browser/desktopHostService.ts
浏览文件 @
2e94e43a
...
@@ -24,26 +24,17 @@ export class DesktopHostService extends Disposable implements IHostService {
...
@@ -24,26 +24,17 @@ export class DesktopHostService extends Disposable implements IHostService {
@
IElectronEnvironmentService
private
readonly
electronEnvironmentService
:
IElectronEnvironmentService
@
IElectronEnvironmentService
private
readonly
electronEnvironmentService
:
IElectronEnvironmentService
)
{
)
{
super
();
super
();
// Resolve initial window focus state
this
.
_hasFocus
=
document
.
hasFocus
();
electronService
.
isWindowFocused
().
then
(
focused
=>
this
.
_hasFocus
=
focused
);
this
.
registerListeners
();
}
private
registerListeners
():
void
{
this
.
_register
(
this
.
onDidChangeFocus
(
focus
=>
this
.
_hasFocus
=
focus
));
}
}
get
onDidChangeFocus
():
Event
<
boolean
>
{
return
this
.
_onDidChangeFocus
;
}
get
onDidChangeFocus
():
Event
<
boolean
>
{
return
this
.
_onDidChangeFocus
;
}
private
_onDidChangeFocus
:
Event
<
boolean
>
=
Event
.
any
(
private
_onDidChangeFocus
:
Event
<
boolean
>
=
Event
.
any
(
Event
.
map
(
Event
.
filter
(
this
.
electronService
.
onWindowFocus
,
id
=>
id
===
this
.
electronEnvironmentService
.
windowId
),
_
=>
true
),
Event
.
map
(
Event
.
filter
(
this
.
electronService
.
onWindowFocus
,
id
=>
id
===
this
.
electronEnvironmentService
.
windowId
),
()
=>
this
.
hasFocus
),
Event
.
map
(
Event
.
filter
(
this
.
electronService
.
onWindowBlur
,
id
=>
id
===
this
.
electronEnvironmentService
.
windowId
),
_
=>
false
)
Event
.
map
(
Event
.
filter
(
this
.
electronService
.
onWindowBlur
,
id
=>
id
===
this
.
electronEnvironmentService
.
windowId
),
()
=>
this
.
hasFocus
)
);
);
private
_hasFocus
:
boolean
;
get
hasFocus
():
boolean
{
get
hasFocus
():
boolean
{
return
this
.
_hasFocus
;
}
return
document
.
hasFocus
();
}
openWindow
(
options
?:
IOpenEmptyWindowOptions
):
Promise
<
void
>
;
openWindow
(
options
?:
IOpenEmptyWindowOptions
):
Promise
<
void
>
;
openWindow
(
toOpen
:
IWindowOpenable
[],
options
?:
IOpenWindowOptions
):
Promise
<
void
>
;
openWindow
(
toOpen
:
IWindowOpenable
[],
options
?:
IOpenWindowOptions
):
Promise
<
void
>
;
...
...
src/vs/workbench/test/workbenchTestServices.ts
浏览文件 @
2e94e43a
...
@@ -1404,7 +1404,6 @@ export class TestElectronService implements IElectronService {
...
@@ -1404,7 +1404,6 @@ export class TestElectronService implements IElectronService {
async
maximizeWindow
():
Promise
<
void
>
{
}
async
maximizeWindow
():
Promise
<
void
>
{
}
async
unmaximizeWindow
():
Promise
<
void
>
{
}
async
unmaximizeWindow
():
Promise
<
void
>
{
}
async
minimizeWindow
():
Promise
<
void
>
{
}
async
minimizeWindow
():
Promise
<
void
>
{
}
async
isWindowFocused
():
Promise
<
boolean
>
{
return
true
;
}
async
focusWindow
(
options
?:
{
windowId
?:
number
|
undefined
;
}
|
undefined
):
Promise
<
void
>
{
}
async
focusWindow
(
options
?:
{
windowId
?:
number
|
undefined
;
}
|
undefined
):
Promise
<
void
>
{
}
async
showMessageBox
(
options
:
Electron
.
MessageBoxOptions
):
Promise
<
Electron
.
MessageBoxReturnValue
>
{
throw
new
Error
(
'
Method not implemented.
'
);
}
async
showMessageBox
(
options
:
Electron
.
MessageBoxOptions
):
Promise
<
Electron
.
MessageBoxReturnValue
>
{
throw
new
Error
(
'
Method not implemented.
'
);
}
async
showSaveDialog
(
options
:
Electron
.
SaveDialogOptions
):
Promise
<
Electron
.
SaveDialogReturnValue
>
{
throw
new
Error
(
'
Method not implemented.
'
);
}
async
showSaveDialog
(
options
:
Electron
.
SaveDialogOptions
):
Promise
<
Electron
.
SaveDialogReturnValue
>
{
throw
new
Error
(
'
Method not implemented.
'
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录