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

Commit39ee940

Browse files
authored
fix: add missingset_wants_to_be_visible(true) toNativeWindowMac::ShowInactive() (#40546)
* fix: add missing set_wants_to_be_visible(true) to NativeWindowMac::ShowInactive()* add test
1 parentb2fcc15 commit39ee940

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

‎shell/browser/native_window_mac.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,8 @@ void ReorderChildWindowAbove(NSWindow* child_window, NSWindow* other_window) {
534534
}
535535

536536
voidNativeWindowMac::ShowInactive() {
537+
set_wants_to_be_visible(true);
538+
537539
// Reattach the window to the parent to actually show it.
538540
if (parent())
539541
InternalSetParentWindow(parent(),true);

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,6 +1144,34 @@ describe('BrowserWindow module', () => {
11441144
awaitshown;
11451145
expect(w.isMaximized()).to.equal(true);
11461146
});
1147+
1148+
ifit(process.platform==='darwin')('should attach child window to parent',async()=>{
1149+
constwShow=once(w,'show');
1150+
w.show();
1151+
awaitwShow;
1152+
1153+
constc=newBrowserWindow({show:false,parent:w});
1154+
constcShow=once(c,'show');
1155+
c.showInactive();
1156+
awaitcShow;
1157+
1158+
// verifying by checking that the child tracks the parent's visibility
1159+
constminimized=once(w,'minimize');
1160+
w.minimize();
1161+
awaitminimized;
1162+
1163+
expect(w.isVisible()).to.be.false('parent is visible');
1164+
expect(c.isVisible()).to.be.false('child is visible');
1165+
1166+
constrestored=once(w,'restore');
1167+
w.restore();
1168+
awaitrestored;
1169+
1170+
expect(w.isVisible()).to.be.true('parent is visible');
1171+
expect(c.isVisible()).to.be.true('child is visible');
1172+
1173+
closeWindow(c);
1174+
});
11471175
});
11481176

11491177
describe('BrowserWindow.focus()',()=>{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp