Qt5 correctly focus the navigator window

Handle SalFrame::Show's bNoActivate. The missing implementation
became visible with commit 001cf630f1
("register navigator individually in each module that it exists in")

Change-Id: I5edf43bdf2b0460410fdd846c7698d00299088bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114116
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
This commit is contained in:
Jan-Marek Glogowski
2021-04-15 00:37:55 +02:00
parent 9536eb17ed
commit cf5cc42785

View File

@@ -412,16 +412,26 @@ void Qt5Frame::DrawMenuBar() { /* not needed */}
void Qt5Frame::SetExtendedFrameStyle(SalExtStyle /*nExtStyle*/) { /* not needed */}
void Qt5Frame::Show(bool bVisible, bool /*bNoActivate*/)
void Qt5Frame::Show(bool bVisible, bool bNoActivate)
{
assert(m_pQWidget);
if (bVisible == asChild()->isVisible())
return;
SetDefaultSize();
SetDefaultPos();
auto* pSalInst(static_cast<Qt5Instance*>(GetSalData()->m_pInstance));
assert(pSalInst);
pSalInst->RunInMainThread([this, bVisible]() { asChild()->setVisible(bVisible); });
pSalInst->RunInMainThread([this, bVisible, bNoActivate]() {
asChild()->setVisible(bVisible);
asChild()->raise();
if (!bNoActivate)
{
asChild()->activateWindow();
asChild()->setFocus();
}
});
}
void Qt5Frame::SetMinClientSize(tools::Long nWidth, tools::Long nHeight)