Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion frame/layershell/x11dlayershellemulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,16 @@ LayerShellEmulation::LayerShellEmulation(QWindow* window, QObject *parent)
connect(qApp, &QGuiApplication::screenAdded, this, [this] (const QScreen *newScreen) {
connect(newScreen, &QScreen::geometryChanged, this, &LayerShellEmulation::onPositionChanged);
connect(newScreen, &QScreen::geometryChanged, &m_exclusionZoneChangedTimer, static_cast<void (QTimer::*)()>(&QTimer::start));
m_exclusionZoneChangedTimer.start();
});
connect(qApp, &QGuiApplication::primaryScreenChanged, &m_exclusionZoneChangedTimer, static_cast<void (QTimer::*)()>(&QTimer::start));
connect(m_window, &QWindow::screenChanged, this, [this](QScreen *nowScreen){
onPositionChanged();
m_exclusionZoneChangedTimer.start();
});

connect(qApp, &QGuiApplication::screenRemoved, &m_exclusionZoneChangedTimer, static_cast<void (QTimer::*)()>(&QTimer::start));
Copy link
Contributor

@18202781743 18202781743 Apr 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这种插拔多次, 会重复连接吧,
是不是应该加上Qt::UniqueConnection,


// connect(m_dlayerShellWindow, &DS_NAMESPACE::DLayerShellWindow::keyboardInteractivityChanged, this, &LayerShellEmulation::onKeyboardInteractivityChanged);
}

Expand Down Expand Up @@ -188,7 +191,7 @@ void LayerShellEmulation::onExclusionZoneChanged()
if (boundary < screen->geometry().bottom())
boundary = screen->geometry().bottom();
}
strut_partial.bottom = + boundary - rect.bottom() + (m_dlayerShellWindow->exclusionZone()) * scaleFactor;
strut_partial.bottom = boundary - rect.bottom() + (m_dlayerShellWindow->exclusionZone()) * scaleFactor;
strut_partial.bottom_start_x = rect.x();
strut_partial.bottom_end_x = rect.x() + m_window->width();
}
Expand Down