diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-12-09 13:10:57 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2011-01-17 13:35:51 (GMT) |
commit | 72aa2eb43b0cf5a6eef940da05ac58f605794ffb (patch) | |
tree | e71eca54cfa309286b5203601c7ed2f3461a26ad /src/gui/kernel/qapplication.cpp | |
parent | 09656c9b57af5bb383d029c62396b536899b28e7 (diff) | |
download | Qt-72aa2eb43b0cf5a6eef940da05ac58f605794ffb.zip Qt-72aa2eb43b0cf5a6eef940da05ac58f605794ffb.tar.gz Qt-72aa2eb43b0cf5a6eef940da05ac58f605794ffb.tar.bz2 |
Alien implementation for the Cocoa port
Give Alien on Cocoa a warm welcome.
Diffstat (limited to 'src/gui/kernel/qapplication.cpp')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 833e803..27d34db 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -2772,7 +2772,7 @@ void QApplicationPrivate::dispatchEnterLeave(QWidget* enter, QWidget* leave) { for (int i = 0; i < leaveList.size(); ++i) { w = leaveList.at(i); if (!QApplication::activeModalWidget() || QApplicationPrivate::tryModalHelper(w, 0)) { -#if defined(Q_WS_WIN) || defined(Q_WS_X11) +#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_MAC) if (leaveAfterRelease == w) leaveAfterRelease = 0; #endif @@ -3143,13 +3143,11 @@ bool QApplicationPrivate::sendMouseEvent(QWidget *receiver, QMouseEvent *event, // Dispatch enter/leave if: // 1) the mouse grabber is an alien widget // 2) the button is released on an alien widget - QWidget *enter = 0; if (nativeGuard) enter = alienGuard ? alienWidget : nativeWidget; else // The receiver is typically deleted on mouse release with drag'n'drop. enter = QApplication::widgetAt(event->globalPos()); - dispatchEnterLeave(enter, leaveAfterRelease); leaveAfterRelease = 0; lastMouseReceiver = enter; @@ -3696,15 +3694,6 @@ void QApplication::changeOverrideCursor(const QCursor &cursor) if (qApp->d_func()->cursor_list.isEmpty()) return; qApp->d_func()->cursor_list.removeFirst(); -#ifdef QT_MAC_USE_COCOA - // We use native NSCursor stacks in Cocoa. The currentCursor is the - // top of this stack. So to avoid flickering of cursor, we have to - // change the cusor instead of pop-ing the existing OverrideCursor - // and pushing the new one. - qApp->d_func()->cursor_list.prepend(cursor); - qt_cocoaChangeOverrideCursor(cursor); - return; -#endif setOverrideCursor(cursor); } #endif |