Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita95d9a4

Browse files
trop[bot]ckerr
andauthored
fix: LinuxvisibleOnAllWorkspaces property (#46862)
* test: do not skip visibleOnAllWorkspaces tests on WindowsThat feature is supported on Linux, so move the test from the"window states (excluding Linux)" section into the"window states" section.Co-authored-by: Charles Kerr <charles@charleskerr.com>Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>* chore: disable visibleOnAllWorkspaces test on LinuxCo-authored-by: Charles Kerr <charles@charleskerr.com>* fix: NativeWindowViews::IsVisibleOnAllWorkspacesCo-authored-by: Charles Kerr <charles@charleskerr.com>* test: enable visibleOnAllWorkspaces tests on LinuxCo-authored-by: Charles Kerr <charles@charleskerr.com>---------Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>Co-authored-by: Charles Kerr <charles@charleskerr.com>
1 parente9a88d4 commita95d9a4

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

‎shell/browser/native_window_views.cc‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,6 +1522,13 @@ void NativeWindowViews::SetVisibleOnAllWorkspaces(
15221522
}
15231523

15241524
boolNativeWindowViews::IsVisibleOnAllWorkspaces()const {
1525+
// NB: Electron >= 37 has a better long-term fix, but it also has an edge
1526+
// case which is a breaking change. The code here is dirtier (e.g. accessing
1527+
// a method marked as private) to avoid that edge case. More info @
1528+
// https://github.com/electron/electron/pull/46834#issuecomment-2836287699
1529+
if (constauto* view_native_widget =widget()->native_widget_private())
1530+
return view_native_widget->IsVisibleOnAllWorkspaces();
1531+
15251532
#if BUILDFLAG(IS_LINUX)
15261533
if (IsX11()) {
15271534
// Use the presence/absence of _NET_WM_STATE_STICKY in _NET_WM_STATE to

‎spec/api-browser-window-spec.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5407,8 +5407,7 @@ describe('BrowserWindow module', () => {
54075407
});
54085408
});
54095409

5410-
// FIXME: enable this test on Linux as well.
5411-
ifdescribe(process.platform==='darwin')('visibleOnAllWorkspaces state',()=>{
5410+
ifdescribe(process.platform!=='win32')('visibleOnAllWorkspaces state',()=>{
54125411
describe('with properties',()=>{
54135412
it('can be changed',()=>{
54145413
constw=newBrowserWindow({show:false});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp