From f3e1dfb786c8c425562a29bd2ca18dbeb1d4ea84 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 20 Jul 2015 16:30:35 +0200 Subject: [PATCH] Windows: Fix handling of cursor flash time. Check for special return value INFINITE (unsigned -1) of GetCaretBlinkTime() (indicating cursor should not flash) and return 0 in that case. Change-Id: Iead41a20a68b79d04b03f77a3caf063d4e1d577e Task-number: QTBUG-47208 Reviewed-by: Joerg Bornemann --- src/plugins/platforms/windows/qwindowsintegration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index 9b0f126241..79df6ce720 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -491,7 +491,7 @@ QVariant QWindowsIntegration::styleHint(QPlatformIntegration::StyleHint hint) co switch (hint) { case QPlatformIntegration::CursorFlashTime: if (const unsigned timeMS = GetCaretBlinkTime()) - return QVariant(int(timeMS) * 2); + return QVariant(timeMS != INFINITE ? int(timeMS) * 2 : 0); break; #ifdef SPI_GETKEYBOARDSPEED case KeyboardAutoRepeatRate: