1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-12 01:17:55 +03:00

wayland:fix view config windows positioning

This commit is contained in:
Michail Vourlakos 2020-07-11 17:31:45 +03:00
parent c2df25649e
commit 2b7d663950
4 changed files with 16 additions and 0 deletions

View File

@ -138,6 +138,11 @@ bool CanvasConfigView::event(QEvent *e)
void CanvasConfigView::showEvent(QShowEvent *ev) void CanvasConfigView::showEvent(QShowEvent *ev)
{ {
if (m_shellSurface) {
//! under wayland it needs to be set again after its hiding
m_shellSurface->setPosition(m_geometryWhenVisible.topLeft());
}
QQuickWindow::showEvent(ev); QQuickWindow::showEvent(ev);
if (!m_latteView) { if (!m_latteView) {

View File

@ -377,6 +377,11 @@ void PrimaryConfigView::syncGeometry()
void PrimaryConfigView::showEvent(QShowEvent *ev) void PrimaryConfigView::showEvent(QShowEvent *ev)
{ {
if (m_shellSurface) {
//! under wayland it needs to be set again after its hiding
m_shellSurface->setPosition(m_geometryWhenVisible.topLeft());
}
QQuickWindow::showEvent(ev); QQuickWindow::showEvent(ev);
if (!m_latteView) { if (!m_latteView) {

View File

@ -182,6 +182,11 @@ void SecondaryConfigView::syncGeometry()
void SecondaryConfigView::showEvent(QShowEvent *ev) void SecondaryConfigView::showEvent(QShowEvent *ev)
{ {
if (m_shellSurface) {
//! under wayland it needs to be set again after its hiding
m_shellSurface->setPosition(m_geometryWhenVisible.topLeft());
}
QQuickWindow::showEvent(ev); QQuickWindow::showEvent(ev);
if (!m_latteView) { if (!m_latteView) {

View File

@ -61,6 +61,7 @@ SubConfigView::SubConfigView(Latte::View *view, const QString &title, const bool
setIcon(qGuiApp->windowIcon()); setIcon(qGuiApp->windowIcon());
if (!m_isNormalWindow) { if (!m_isNormalWindow) {
setFlags(wFlags());
m_corona->wm()->setViewExtraFlags(this, true, Latte::Types::AlwaysVisible); m_corona->wm()->setViewExtraFlags(this, true, Latte::Types::AlwaysVisible);
} }