diff --git a/app/dockconfigview.cpp b/app/dockconfigview.cpp index d9e1505c9..289d850c8 100644 --- a/app/dockconfigview.cpp +++ b/app/dockconfigview.cpp @@ -45,7 +45,7 @@ DockConfigView::DockConfigView(Plasma::Containment *containment, DockView *dockV m_blockFocusLost(false), m_dockView(dockView) { - setupWaylandIntegration(); + //setupWaylandIntegration(); setScreen(m_dockView->screen()); @@ -113,8 +113,8 @@ void DockConfigView::init() kdeclarative.setupBindings(); auto source = QUrl::fromLocalFile(m_dockView->containment()->corona()->kPackage().filePath("lattedockconfigurationui")); setSource(source); - syncGeometry(); - syncSlideEffect(); + //syncGeometry(); + //syncSlideEffect(); } inline Qt::WindowFlags DockConfigView::wFlags() const @@ -279,7 +279,8 @@ void DockConfigView::focusOutEvent(QFocusEvent *ev) return; if (!m_blockFocusLost) { - hide(); + setVisible(false); + //hide(); } } @@ -307,6 +308,8 @@ void DockConfigView::setupWaylandIntegration() qDebug() << "wayland dock window surface was created..."; m_shellSurface = interface->createSurface(s, this); + + syncGeometry(); } } @@ -343,7 +346,8 @@ bool DockConfigView::event(QEvent *e) void DockConfigView::immutabilityChanged(Plasma::Types::ImmutabilityType type) { if (type != Plasma::Types::Mutable && isVisible()) { - hide(); + setVisible(false); + //hide(); } } @@ -365,7 +369,8 @@ void DockConfigView::addPanelSpacer() void DockConfigView::hideConfigWindow() { - hide(); + setVisible(false); + //hide(); } diff --git a/app/dockconfigview.h b/app/dockconfigview.h index 649f181be..23798462a 100644 --- a/app/dockconfigview.h +++ b/app/dockconfigview.h @@ -91,7 +91,7 @@ private: QTimer m_screenSyncTimer; QList connections; - QPointer m_shellSurface; + KWayland::Client::PlasmaShellSurface *m_shellSurface{nullptr}; }; } diff --git a/app/dockview.cpp b/app/dockview.cpp index 50b46dd57..e2de9689b 100644 --- a/app/dockview.cpp +++ b/app/dockview.cpp @@ -143,7 +143,7 @@ DockView::~DockView() //! this->disconnect(); if (m_configView) - m_configView->hide(); + m_configView->setVisible(false);//hide(); if (m_visibility) delete m_visibility; @@ -440,19 +440,23 @@ void DockView::showConfigurationInterface(Plasma::Applet *applet) if (m_configView && c && c->isContainment() && c == this->containment()) { if (m_configView->isVisible()) { - m_configView->hide(); + m_configView->setVisible(false); + //m_configView->hide(); } else { - m_configView->show(); + m_configView->setVisible(true); + //m_configView->show(); } return; } else if (m_configView) { if (m_configView->applet() == applet) { - m_configView->show(); + m_configView->setVisible(true); + //m_configView->show(); m_configView->requestActivate(); return; } else { - m_configView->hide(); + m_configView->setVisible(false); + //m_configView->hide(); m_configView->deleteLater(); } } @@ -469,12 +473,19 @@ void DockView::showConfigurationInterface(Plasma::Applet *applet) m_configView.data()->init(); if (!delayConfigView) { - m_configView.data()->show(); + m_configView->setVisible(true); + //m_configView.data()->show(); } else { //add a timer for showing the configuration window the first time it is //created in order to give the containmnent's layouts the time to //calculate the window's height - QTimer::singleShot(150, m_configView, SLOT(show())); + if (!KWindowSystem::isPlatformWayland()) { + QTimer::singleShot(150, m_configView, SLOT(show())); + } else { + QTimer::singleShot(150, [this]() { + m_configView->setVisible(true); + }); + } } }