diff options
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 15 | ||||
-rw-r--r-- | src/gui/kernel/qcursor_s60.cpp | 10 | ||||
-rw-r--r-- | src/gui/kernel/qdnd_s60.cpp | 10 | ||||
-rw-r--r-- | src/gui/kernel/qt_s60_p.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qtooltip.cpp | 6 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 3 |
6 files changed, 34 insertions, 12 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index fd889fc..6a381f5 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -439,7 +439,7 @@ void QSymbianControl::HandlePointerEvent(const TPointerEvent& pEvent) } } S60->lastCursorPos = globalPos; -#ifndef Q_SYMBIAN_FIXED_POINTER_CURSORS +#if !defined(QT_NO_CURSOR) && !defined(Q_SYMBIAN_FIXED_POINTER_CURSORS) if (S60->brokenPointerCursors) qt_symbian_move_cursor_sprite(); #endif @@ -855,7 +855,6 @@ void qt_init(QApplicationPrivate * /* priv */, int) //Check if mouse interaction is supported (either EMouse=1 in the HAL, or EMachineUID is one of the phones known to support this) const TInt KMachineUidSamsungI8510 = 0x2000C51E; - const TInt KMachineUidSamsungI550 = 0x2000A678; TInt machineUID; TInt mouse; TInt touch; @@ -888,6 +887,7 @@ void qt_init(QApplicationPrivate * /* priv */, int) QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadDirectional; } +#ifndef QT_NO_CURSOR //Check if window server pointer cursors are supported or not #ifndef Q_SYMBIAN_FIXED_POINTER_CURSORS //In generic binary, use the HAL and OS version @@ -912,6 +912,7 @@ void qt_init(QApplicationPrivate * /* priv */, int) #endif S60->wsSession().SetPointerCursorMode(EPointerCursorNormal); } +#endif /* ### Commented out for now as parameter handling not needed in SOS(yet). Code below will break testlib with -o flag @@ -1275,7 +1276,7 @@ int QApplication::s60ProcessEvent(TWsEvent *event) } break; case EEventFocusGained: - RDebug::Printf("focus gained %x", control); +#ifndef QT_NO_CURSOR //re-enable mouse interaction if (S60->mouseInteractionEnabled) { #ifndef Q_SYMBIAN_FIXED_POINTER_CURSORS @@ -1285,9 +1286,10 @@ int QApplication::s60ProcessEvent(TWsEvent *event) #endif S60->wsSession().SetPointerCursorMode(EPointerCursorNormal); } +#endif break; case EEventFocusLost: - RDebug::Printf("focus lost %x", control); +#ifndef QT_NO_CURSOR //disable mouse as may be moving to application that does not support it if (S60->mouseInteractionEnabled) { #ifndef Q_SYMBIAN_FIXED_POINTER_CURSORS @@ -1297,6 +1299,7 @@ int QApplication::s60ProcessEvent(TWsEvent *event) #endif S60->wsSession().SetPointerCursorMode(EPointerCursorNone); } +#endif break; default: break; @@ -1534,7 +1537,9 @@ void QApplication::restoreOverrideCursor() QListIterator<WId> iter(QWidgetPrivate::mapper->uniqueKeys()); while (iter.hasNext()) { CCoeControl *ctrl = iter.next(); - ctrl->DrawableWindow()->ClearPointerCursor(); + if(ctrl->OwnsWindow()) { + ctrl->DrawableWindow()->ClearPointerCursor(); + } } if (w) qt_symbian_setWindowCursor(w->cursor(), w->effectiveWinId()); diff --git a/src/gui/kernel/qcursor_s60.cpp b/src/gui/kernel/qcursor_s60.cpp index 757eaa8..0d8283d 100644 --- a/src/gui/kernel/qcursor_s60.cpp +++ b/src/gui/kernel/qcursor_s60.cpp @@ -52,8 +52,10 @@ QT_BEGIN_NAMESPACE +#ifndef QT_NO_CURSOR static QCursor cursorSprite; -static int cursorSpriteVisible; +static int cursorSpriteVisible; +#endif //pos and setpos are required whether cursors are configured or not. QPoint QCursor::pos() @@ -520,8 +522,10 @@ void qt_symbian_setGlobalCursor(const QCursor &cursor) while(iter.hasNext()) { CCoeControl *ctrl = iter.next(); - RWindowTreeNode *node = ctrl->DrawableWindow(); - qt_symbian_setWindowGroupCursor(cursor, *node); + if(ctrl->OwnsWindow()) { + RWindowTreeNode *node = ctrl->DrawableWindow(); + qt_symbian_setWindowGroupCursor(cursor, *node); + } } } } diff --git a/src/gui/kernel/qdnd_s60.cpp b/src/gui/kernel/qdnd_s60.cpp index 2456185..3d6ecd2 100644 --- a/src/gui/kernel/qdnd_s60.cpp +++ b/src/gui/kernel/qdnd_s60.cpp @@ -214,11 +214,13 @@ bool QDragManager::eventFilter(QObject *o, QEvent *e) case QEvent::MouseButtonRelease: { qApp->removeEventFilter(this); +#ifndef QT_NO_CURSOR if (restoreCursor) { QApplication::restoreOverrideCursor(); willDrop = false; restoreCursor = false; } +#endif if (object && object->target()) { QMouseEvent *me = (QMouseEvent *)e; @@ -267,7 +269,9 @@ Qt::DropAction QDragManager::drag(QDrag *o) updatePixmap(); updateCursor(); +#ifndef QT_NO_CURSOR qt_symbian_set_cursor_visible(true); //force cursor on even for touch phone +#endif object->d_func()->target = 0; @@ -282,10 +286,12 @@ Qt::DropAction QDragManager::drag(QDrag *o) delete eventLoop; eventLoop = 0; +#ifndef QT_NO_CURSOR qt_symbian_set_cursor_visible(false); overrideCursor = QCursor(); //deref the cursor data qt_symbian_dnd_dragging = false; +#endif return global_accepted_action; } @@ -306,10 +312,12 @@ void QDragManager::cancel(bool deleteSource) drag_object = object = 0; } +#ifndef QT_NO_CURSOR if (restoreCursor) { QApplication::restoreOverrideCursor(); restoreCursor = false; } +#endif global_accepted_action = Qt::IgnoreAction; } @@ -317,10 +325,12 @@ void QDragManager::cancel(bool deleteSource) void QDragManager::drop() { +#ifndef QT_NO_CURSOR if (restoreCursor) { QApplication::restoreOverrideCursor(); restoreCursor = false; } +#endif } QVariant QDropData::retrieveData_sys(const QString &mimetype, QVariant::Type type) const diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 794d15a..67084c4 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -304,11 +304,13 @@ static inline QImage::Format qt_TDisplayMode2Format(TDisplayMode mode) return format; } +#ifndef QT_NO_CURSOR void qt_symbian_setWindowCursor(const QCursor &cursor, const CCoeControl* wid); void qt_symbian_setWindowGroupCursor(const QCursor &cursor, RWindowTreeNode &node); void qt_symbian_setGlobalCursor(const QCursor &cursor); void qt_symbian_set_cursor_visible(bool visible); bool qt_symbian_is_cursor_visible(); +#endif QT_END_NAMESPACE diff --git a/src/gui/kernel/qtooltip.cpp b/src/gui/kernel/qtooltip.cpp index a480195..2d0d209 100644 --- a/src/gui/kernel/qtooltip.cpp +++ b/src/gui/kernel/qtooltip.cpp @@ -290,8 +290,8 @@ void QTipLabel::timerEvent(QTimerEvent *e) // Fade out tip on mac (makes it invisible). // The tip will not be deleted until a new tip is shown. - // DRSWAT - Cocoa - macWindowFade(qt_mac_window_for(this)); + // DRSWAT - Cocoa + macWindowFade(qt_mac_window_for(this)); QTipLabel::instance->fadingOut = true; // will never be false again. } else @@ -431,7 +431,7 @@ bool QTipLabel::tipChanged(const QPoint &pos, const QString &text, QObject *o) void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, const QRect &rect) { - if (QTipLabel::instance){ // a tip does already exist + if (QTipLabel::instance && QTipLabel::instance->isVisible()){ // a tip does already exist if (text.isEmpty()){ // empty text means hide current tip QTipLabel::instance->hideTip(); return; diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 522ce33..3744377 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -1222,8 +1222,9 @@ void QWidget::releaseMouse() WId id = effectiveWinId(); id->SetPointerCapture(false); QWidgetPrivate::mouseGrabber = 0; - +#ifndef QT_NO_CURSOR QApplication::restoreOverrideCursor(); +#endif } } |