summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-01-20 19:21:55 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-21 17:07:05 +0100
commitf58dff46f59555bbd6a6ae96bb1d1439f8c4feca (patch)
tree1f3afe840e56fe7694ebb752e89e42899b99a375 /src
parent3277233c2f04f902c1881822d49ccdaf4381fef4 (diff)
Initialize QGuiApplicationPrivate::lastCursorPosition to inf
This makes sure that we don't think a mouse area at position 0, 0 contains the mouse on startup. Task-number: QTBUG-36191 Change-Id: I68a8aed195531f506372ef465734661069b60f57 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qguiapplication.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 0711a37edd..10f099a5ca 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -59,6 +59,7 @@
#include <QtCore/qmutex.h>
#include <QtCore/private/qthread_p.h>
#include <QtCore/qdir.h>
+#include <QtCore/qnumeric.h>
#include <QtDebug>
#ifndef QT_NO_ACCESSIBILITY
#include "qaccessible.h"
@@ -110,7 +111,7 @@ Q_GUI_EXPORT bool qt_is_gui_used = true;
Qt::MouseButtons QGuiApplicationPrivate::mouse_buttons = Qt::NoButton;
Qt::KeyboardModifiers QGuiApplicationPrivate::modifier_buttons = Qt::NoModifier;
-QPointF QGuiApplicationPrivate::lastCursorPosition(0.0, 0.0);
+QPointF QGuiApplicationPrivate::lastCursorPosition(qInf(), qInf());
bool QGuiApplicationPrivate::tabletState = false;
QWindow *QGuiApplicationPrivate::tabletPressTarget = 0;