Bug 1832331 - Don't force WS_POPUP for windows without a titlebar. r=rkraesig

That's a rather obscure side effect, which causes the window not to be
recognized as toplevel in some tools.

Other platforms don't have such weirdness. You can still create windows
with WindowType::Popup for that.

Note: We also remove the WS_CHILD bit, which is there just because the
documentation mentions that it's exclusive with WS_POPUP, but I don't
think anything sets that bit earlier, so it's a no-op.

Differential Revision: https://phabricator.services.mozilla.com/D177673
This commit is contained in:
Emilio Cobos Álvarez 2023-05-11 19:00:55 +00:00
parent 083c120819
commit 21bea21449

View File

@ -1407,8 +1407,6 @@ DWORD nsWindow::WindowStyle() {
if (mBorderStyle == BorderStyle::None ||
!(mBorderStyle & BorderStyle::Title)) {
style &= ~WS_DLGFRAME;
style |= WS_POPUP;
style &= ~WS_CHILD;
}
if (mBorderStyle == BorderStyle::None ||