From cefa54d478fa69d1482602ff442af45bb73c5a7f Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 20 Nov 2013 07:42:14 +0100 Subject: [PATCH] When we get a WindowBlocked event then reset the qt_button_down value Whenever a window gets blocked, then the qt_button_down variable should be reset as it is not going to receive the release event for the mouse. This fixes problems with the mouse cursor not being updated when moving over widgets (such as QLineEdit) after a dialog is shown in response to a press event. Change-Id: Idfd072eaf36f51b816a0b2a0391cdc447d7a5d9d Reviewed-by: Friedemann Kleint --- src/widgets/kernel/qwidgetwindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index e977ab3d6f..2e96247873 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -251,7 +251,9 @@ bool QWidgetWindow::event(QEvent *event) case QEvent::Show: case QEvent::Hide: return QWindow::event(event); - + case QEvent::WindowBlocked: + qt_button_down = 0; + break; default: break; }