summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication_qpa.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_qpa.cpp b/src/gui/kernel/qapplication_qpa.cpp
index 98359e4..5787c71 100644
--- a/src/gui/kernel/qapplication_qpa.cpp
+++ b/src/gui/kernel/qapplication_qpa.cpp
@@ -612,6 +612,9 @@ void QApplication::setMainWidget(QWidget *mainWidget)
void QApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent *e)
{
+ if (!e->widget)
+ return;
+
// qDebug() << "handleMouseEvent" << tlw << ev.pos() << ev.globalPos() << hex << ev.buttons();
static QWeakPointer<QWidget> implicit_mouse_grabber;
@@ -768,6 +771,10 @@ void QApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mouse
void QApplicationPrivate::processWheelEvent(QWindowSystemInterfacePrivate::WheelEvent *e)
{
+
+ if (!e->widget)
+ return;
+
// QPoint localPoint = ev.pos();
QPoint globalPoint = e->globalPos;
// bool trustLocalPoint = !!tlw; //is there something the local point can be local to?
@@ -842,12 +849,18 @@ void QApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEven
void QApplicationPrivate::processEnterEvent(QWindowSystemInterfacePrivate::EnterEvent *e)
{
+ if (!e->enter)
+ return;
+
QApplicationPrivate::dispatchEnterLeave(e->enter.data(),0);
qt_last_mouse_receiver = e->enter.data();
}
void QApplicationPrivate::processLeaveEvent(QWindowSystemInterfacePrivate::LeaveEvent *e)
{
+ if (!e->leave)
+ return;
+
QApplicationPrivate::dispatchEnterLeave(0,qt_last_mouse_receiver);
if (e->leave.data() && !e->leave.data()->isAncestorOf(qt_last_mouse_receiver)) //(???) this should not happen
@@ -858,6 +871,9 @@ void QApplicationPrivate::processLeaveEvent(QWindowSystemInterfacePrivate::Leave
void QApplicationPrivate::processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent *e)
{
+ if (!e->activated)
+ return;
+
QApplication::setActiveWindow(e->activated.data());
}