diff --git a/debian/changelog b/debian/changelog index 90f04ab71..9928a775f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +kwin (4:5.24.4-ok6~1212) yangtze; urgency=medium + + * Fix the problem that kwin crashes when the system mode changes + + -- liling Mon, 12 Dec 2022 16:56:04 +0800 + kwin (4:5.24.4-ok6~1207) yangtze; urgency=medium * fix blur effect on the window corner diff --git a/src/effects.cpp b/src/effects.cpp index b5208cb83..0b46e9dc3 100644 --- a/src/effects.cpp +++ b/src/effects.cpp @@ -278,26 +278,22 @@ void EffectsHandlerImpl::setDesktopHide(const QString &desktopName) m_desktopName = desktopName; - auto list = Workspace::self()->stackingOrder(); - for (auto window : list) { - if (!window->isDeleted()) { - auto win = qobject_cast (window); - if (win->isDesktop()) { - if (TabletManager::self()->tabletMode()) { - if (win->caption() == "ukui-tablet-desktop") { - win->showClient(); - } else { - win->hideClient(); - } + for (const auto& win : Workspace::self()->allClientList()) { + if (win->isDesktop()) { + if (TabletManager::self()->tabletMode()) { + if (win->caption() == "ukui-tablet-desktop") { + win->showClient(); } else { - if (win->caption() == "ukui-tablet-desktop") { - win->hideClient(); - } else { - win->showClient(); - } + win->hideClient(); } - } - } + } else { + if (win->caption() == "ukui-tablet-desktop") { + win->hideClient(); + } else { + win->showClient(); + } + } + } } Q_EMIT desktopAppearAnimatestart(); } diff --git a/src/gesture_follow.cpp b/src/gesture_follow.cpp index 370aaa4e8..58a93e719 100644 --- a/src/gesture_follow.cpp +++ b/src/gesture_follow.cpp @@ -267,10 +267,6 @@ void GestureFollowInputFilter::touchMotion(qint32 id, const QPointF &pos, quint3 desktopOpacityAnimation(pos.y()); } - #ifndef QT_NO_DEBUG - qDebug() << "当前手指的位置:" << pos.y() << "唤起多任务视图临近值: " << m_YcriticalValue - << "任务栏初始位置:" << m_panelOriginYCoordinate; - #endif if (pos.y() > m_YcriticalValue && m_startGestureFollow && m_gestureFollowWindow != nullptr) { if(pos.y() > m_panelOriginYCoordinate) {