diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 67f96160165b..1823601b5331 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1748,9 +1748,11 @@ VclPtr VclBuilder::makeObject(vcl::Window *pParent, const OString & // WB_ALLOWMENUBAR because we don't know in advance if we will encounter // a menubar, and menubars need a BorderWindow in the toplevel, and // such border windows need to be in created during the dialog ctor - WinBits nBits = WB_MOVEABLE|WB_3DLOOK|WB_CLOSEABLE|WB_ALLOWMENUBAR; + WinBits nBits = WB_MOVEABLE|WB_3DLOOK|WB_ALLOWMENUBAR; if (extractResizable(rMap)) nBits |= WB_SIZEABLE; + if (extractCloseable(rMap)) + nBits |= WB_CLOSEABLE; Dialog::InitFlag eInit = !pParent ? Dialog::InitFlag::NoParent : Dialog::InitFlag::Default; if (name == "GtkAssistant") xWindow = VclPtr::Create(pParent, nBits, eInit);