mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
Ensure transient parent window for LocationCompleterView
This makes sure that the completer listview is properly positioned on wayland. Tested with Qt 5.9 RC. Closes #2344.
This commit is contained in:
parent
8dd870bc53
commit
2a2c49ca47
|
@ -29,6 +29,8 @@
|
||||||
#include "bookmarkitem.h"
|
#include "bookmarkitem.h"
|
||||||
#include "qzsettings.h"
|
#include "qzsettings.h"
|
||||||
|
|
||||||
|
#include <QWindow>
|
||||||
|
|
||||||
LocationCompleterView* LocationCompleter::s_view = 0;
|
LocationCompleterView* LocationCompleter::s_view = 0;
|
||||||
LocationCompleterModel* LocationCompleter::s_model = 0;
|
LocationCompleterModel* LocationCompleter::s_model = 0;
|
||||||
|
|
||||||
|
@ -293,6 +295,11 @@ void LocationCompleter::showPopup()
|
||||||
connect(s_view, SIGNAL(indexDeleteRequested(QModelIndex)), this, SLOT(indexDeleteRequested(QModelIndex)));
|
connect(s_view, SIGNAL(indexDeleteRequested(QModelIndex)), this, SLOT(indexDeleteRequested(QModelIndex)));
|
||||||
connect(s_view->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(currentChanged(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());
|
||||||
|
}
|
||||||
|
|
||||||
adjustPopupSize();
|
adjustPopupSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user