From 52731ace8fd07448d009a1b377085ec0fbba54d7 Mon Sep 17 00:00:00 2001 From: liling Date: Mon, 12 Dec 2022 16:52:00 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=E8=A7=A3=E5=86=B3Pc=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E5=B9=B3=E6=9D=BF=E6=A8=A1=E5=BC=8F=EF=BC=8Ckwin=E5=B4=A9?= =?UTF-8?q?=E6=BA=83=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 6 ++++++ src/effects.cpp | 32 ++++++++++++++------------------ src/gesture_follow.cpp | 4 ---- 3 files changed, 20 insertions(+), 22 deletions(-) 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) {