From e611d59c05aa3acb71c50bc049935e8123a0ff67 Mon Sep 17 00:00:00 2001 From: Mirko Vogt Date: Mon, 11 Dec 2017 17:38:30 +0100 Subject: [PATCH] qt5base: extend patch to prevent SEGV when hiding cursor is desired --- .../qt5base/patches/005-fix-segv-if-no-cursor.patch | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/frameworks/qt5base/patches/005-fix-segv-if-no-cursor.patch b/frameworks/qt5base/patches/005-fix-segv-if-no-cursor.patch index 5c78d8f..cf34e4d 100644 --- a/frameworks/qt5base/patches/005-fix-segv-if-no-cursor.patch +++ b/frameworks/qt5base/patches/005-fix-segv-if-no-cursor.patch @@ -18,6 +18,8 @@ diff --git a/src/platformsupport/fbconvenience/qfbcursor.cpp b/src/platformsuppo index 7daf3f4d0c..c7b1a71c04 100644 --- a/src/platformsupport/fbconvenience/qfbcursor.cpp +++ b/src/platformsupport/fbconvenience/qfbcursor.cpp +--- a/src/platformsupport/fbconvenience/qfbcursor.cpp ++++ b/src/platformsupport/fbconvenience/qfbcursor.cpp @@ -112,6 +112,8 @@ void QFbCursor::pointerEvent(const QMouseEvent &e) if (e.type() != QEvent::MouseMove) return; @@ -27,6 +29,13 @@ index 7daf3f4d0c..c7b1a71c04 100644 mCurrentRect = getCurrentRect(); if (mOnScreen || mScreen->geometry().intersects(mCurrentRect.translated(mScreen->geometry().topLeft()))) setDirty(); --- -2.15.0 +@@ -165,6 +167,9 @@ void QFbCursor::setCursor(const uchar *data, const uchar *mask, int width, int h + #ifndef QT_NO_CURSOR + void QFbCursor::changeCursor(QCursor * widgetCursor, QWindow *window) + { ++ if (!mVisible) ++ return; ++ + Q_UNUSED(window); + const Qt::CursorShape shape = widgetCursor ? widgetCursor->shape() : Qt::ArrowCursor; -- 2.30.2