diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index a8539e8013..a8c34a8871 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -207,7 +207,9 @@ QMouseEvent::QMouseEvent(Type type, const QPointF &localPos, Qt::MouseButton but Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) : QInputEvent(type, modifiers), l(localPos), w(localPos), b(button), mouseState(buttons), caps(0) { +#ifndef QT_NO_CURSOR s = QCursor::pos(); +#endif } @@ -1545,7 +1547,9 @@ QContextMenuEvent::~QContextMenuEvent() QContextMenuEvent::QContextMenuEvent(Reason reason, const QPoint &pos) : QInputEvent(ContextMenu), p(pos), reas(reason) { +#ifndef QT_NO_CURSOR gp = QCursor::pos(); +#endif } /*! diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp index bd5e21c485..754395592c 100644 --- a/src/gui/kernel/qplatformwindow.cpp +++ b/src/gui/kernel/qplatformwindow.cpp @@ -526,12 +526,14 @@ static inline const QScreen *effectiveScreen(const QWindow *window) if (!screen) return QGuiApplication::primaryScreen(); const QList siblings = screen->virtualSiblings(); +#ifndef QT_NO_CURSOR if (siblings.size() > 1) { const QPoint referencePoint = window->transientParent() ? window->transientParent()->geometry().center() : QCursor::pos(); foreach (const QScreen *sibling, siblings) if (sibling->geometry().contains(referencePoint)) return sibling; } +#endif return screen; } diff --git a/src/gui/kernel/qshapedpixmapdndwindow.cpp b/src/gui/kernel/qshapedpixmapdndwindow.cpp index af60b36647..c8e9c2544d 100644 --- a/src/gui/kernel/qshapedpixmapdndwindow.cpp +++ b/src/gui/kernel/qshapedpixmapdndwindow.cpp @@ -88,12 +88,14 @@ void QShapedPixmapWindow::setHotspot(const QPoint &hotspot) void QShapedPixmapWindow::updateGeometry() { +#ifndef QT_NO_CURSOR QRect rect(QCursor::pos() - m_hotSpot, m_pixmap.size()); if (m_pixmap.isNull()) m_backingStore->resize(QSize(1,1)); else if (m_backingStore->size() != m_pixmap.size()) m_backingStore->resize(m_pixmap.size()); setGeometry(rect); +#endif } void QShapedPixmapWindow::exposeEvent(QExposeEvent *)