File tree 1 file changed +7
-8
lines changed
1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -1332,30 +1332,29 @@ DWORD nsWindow::WindowStyle() {
1332
1332
1333
1333
// Return nsWindow extended styles
1334
1334
DWORD nsWindow::WindowExStyle () {
1335
+ MOZ_ASSERT_IF (mIsAlert , mWindowType == WindowType::Dialog);
1335
1336
switch (mWindowType ) {
1336
1337
case WindowType::Child:
1337
1338
return 0 ;
1338
-
1339
1339
case WindowType::Popup: {
1340
1340
DWORD extendedStyle = WS_EX_TOOLWINDOW;
1341
1341
if (mPopupLevel == PopupLevel::Top) {
1342
1342
extendedStyle |= WS_EX_TOPMOST;
1343
1343
}
1344
1344
return extendedStyle;
1345
1345
}
1346
-
1346
+ case WindowType::Dialog: {
1347
+ if (mIsAlert ) {
1348
+ return WS_EX_TOOLWINDOW;
1349
+ }
1350
+ return WS_EX_WINDOWEDGE | WS_EX_DLGMODALFRAME;
1351
+ }
1347
1352
case WindowType::Sheet:
1348
1353
MOZ_FALLTHROUGH_ASSERT (" Sheets are macOS specific" );
1349
- case WindowType::Dialog:
1350
1354
case WindowType::TopLevel:
1351
1355
case WindowType::Invisible:
1352
1356
break ;
1353
1357
}
1354
- if (mIsAlert ) {
1355
- MOZ_ASSERT (mWindowType == WindowType::Dialog,
1356
- " Expect alert windows to have type=dialog" );
1357
- return WS_EX_TOOLWINDOW;
1358
- }
1359
1358
return WS_EX_WINDOWEDGE;
1360
1359
}
1361
1360
You can’t perform that action at this time.
0 commit comments