mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-08 13:18:09 +03:00
wayland:fix multi-config views behavior
This commit is contained in:
parent
f7e89a6d6e
commit
7084953672
@ -237,6 +237,10 @@ int Positioner::currentScreenId() const
|
||||
|
||||
Latte::WindowSystem::WindowId Positioner::trackedWindowId()
|
||||
{
|
||||
if (KWindowSystem::isPlatformWayland() && m_trackedWindowId.toInt() <= 0) {
|
||||
updateWaylandId();
|
||||
}
|
||||
|
||||
return m_trackedWindowId;
|
||||
}
|
||||
|
||||
|
@ -97,6 +97,7 @@ public slots:
|
||||
void syncGeometry();
|
||||
|
||||
void initDelayedSignals();
|
||||
void updateWaylandId();
|
||||
|
||||
signals:
|
||||
void canvasGeometryChanged();
|
||||
@ -129,7 +130,6 @@ private slots:
|
||||
void screenChanged(QScreen *screen);
|
||||
void validateDockGeometry();
|
||||
void updateInLocationAnimation();
|
||||
void updateWaylandId();
|
||||
void syncLatteViews();
|
||||
void updateContainmentScreen();
|
||||
|
||||
|
@ -151,7 +151,7 @@ void CanvasConfigView::showEvent(QShowEvent *ev)
|
||||
|
||||
//! show Canvas on top of all other panels/docks and show
|
||||
//! its parent view on top afterwards
|
||||
m_corona->wm()->setViewExtraFlags(this, true, Latte::Types::AlwaysVisible);
|
||||
m_corona->wm()->setViewExtraFlags(this, true);
|
||||
|
||||
QTimer::singleShot(100, [this]() {
|
||||
//! delay execution in order to take influence after last Canvas on top call
|
||||
|
@ -133,7 +133,11 @@ void PrimaryConfigView::setOnActivities(QStringList activities)
|
||||
void PrimaryConfigView::requestActivate()
|
||||
{
|
||||
if (m_latteView && m_latteView->visibility()) {
|
||||
m_latteView->visibility()->setViewOnFrontLayer();
|
||||
if (KWindowSystem::isPlatformX11()) {
|
||||
m_latteView->visibility()->setViewOnFrontLayer();
|
||||
} else if (m_shellSurface) {
|
||||
m_corona->wm()->requestActivate(m_latteView->positioner()->trackedWindowId());
|
||||
}
|
||||
}
|
||||
|
||||
if (m_secConfigView) {
|
||||
|
@ -63,7 +63,7 @@ SubConfigView::SubConfigView(Latte::View *view, const QString &title, const bool
|
||||
|
||||
if (!m_isNormalWindow) {
|
||||
setFlags(wFlags());
|
||||
m_corona->wm()->setViewExtraFlags(this, true, Latte::Types::AlwaysVisible);
|
||||
m_corona->wm()->setViewExtraFlags(this, true);
|
||||
}
|
||||
|
||||
m_screenSyncTimer.setSingleShot(true);
|
||||
@ -152,6 +152,10 @@ QString SubConfigView::validTitle() const
|
||||
|
||||
Latte::WindowSystem::WindowId SubConfigView::trackedWindowId()
|
||||
{
|
||||
if (KWindowSystem::isPlatformWayland() && m_waylandWindowId.toInt() <= 0) {
|
||||
updateWaylandId();
|
||||
}
|
||||
|
||||
return !KWindowSystem::isPlatformWayland() ? winId() : m_waylandWindowId;
|
||||
}
|
||||
|
||||
@ -272,9 +276,10 @@ void SubConfigView::setupWaylandIntegration()
|
||||
if (m_isNormalWindow) {
|
||||
m_corona->wm()->setViewExtraFlags(m_shellSurface, false);
|
||||
} else {
|
||||
m_corona->wm()->setViewExtraFlags(m_shellSurface, true, Latte::Types::AlwaysVisible);
|
||||
m_corona->wm()->setViewExtraFlags(m_shellSurface, true);
|
||||
}
|
||||
|
||||
updateWaylandId();
|
||||
syncGeometry();
|
||||
}
|
||||
}
|
||||
|
@ -396,6 +396,9 @@ void View::setupWaylandIntegration()
|
||||
if (m_visibility) {
|
||||
m_visibility->initViewFlags();
|
||||
}
|
||||
if (m_positioner) {
|
||||
m_positioner->updateWaylandId();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -303,7 +303,6 @@ void WaylandInterface::setViewExtraFlags(QObject *view, bool isPanelWindow, Latt
|
||||
QTimer::singleShot(50, [this, surface]() {
|
||||
surface->setRole(PlasmaShellSurface::Role::ToolTip);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user