1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

LocationCompleter: Set BrowserWindow as transient parent

This commit is contained in:
David Rosca 2018-01-07 19:00:16 +01:00
parent ceb087a4c2
commit 4dd67cfce6

View File

@ -340,6 +340,7 @@ void LocationCompleter::loadString(const QString &urlString)
void LocationCompleter::showPopup()
{
Q_ASSERT(m_window);
Q_ASSERT(m_locationBar);
if (!m_locationBar->hasFocus() || s_model->rowCount() == 0) {
@ -366,10 +367,8 @@ void LocationCompleter::showPopup()
connect(s_view, SIGNAL(indexDeleteRequested(QModelIndex)), this, SLOT(indexDeleteRequested(QModelIndex)));
connect(s_view->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(currentChanged(QModelIndex)));
if (m_locationBar->nativeParentWidget()) {
s_view->createWinId();
s_view->windowHandle()->setTransientParent(m_locationBar->nativeParentWidget()->windowHandle());
}
s_view->createWinId();
s_view->windowHandle()->setTransientParent(m_window->windowHandle());
adjustPopupSize();
}