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:
@@ -412,16 +412,26 @@ void Qt5Frame::DrawMenuBar() { /* not needed */}
|
|||||||
|
|
||||||
void Qt5Frame::SetExtendedFrameStyle(SalExtStyle /*nExtStyle*/) { /* 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);
|
assert(m_pQWidget);
|
||||||
|
if (bVisible == asChild()->isVisible())
|
||||||
|
return;
|
||||||
|
|
||||||
SetDefaultSize();
|
SetDefaultSize();
|
||||||
SetDefaultPos();
|
SetDefaultPos();
|
||||||
|
|
||||||
auto* pSalInst(static_cast<Qt5Instance*>(GetSalData()->m_pInstance));
|
auto* pSalInst(static_cast<Qt5Instance*>(GetSalData()->m_pInstance));
|
||||||
assert(pSalInst);
|
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)
|
void Qt5Frame::SetMinClientSize(tools::Long nWidth, tools::Long nHeight)
|
||||||
|
Reference in New Issue
Block a user