diff options
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qcocoaview_mac.mm | 15 | ||||
-rw-r--r-- | src/gui/kernel/qcursor_mac.mm | 10 | ||||
-rw-r--r-- | src/gui/kernel/qkeymapper_s60.cpp | 4 |
3 files changed, 20 insertions, 9 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 9c5380b..dd12f65 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -673,13 +673,14 @@ static int qCocoaViewCount = 0; // Send mouse move and hover events as well: if (!qAppInstance()->activePopupWidget() || qAppInstance()->activePopupWidget() == qwidget->window()) { - if (qwidget->testAttribute(Qt::WA_MouseTracking)) { - NSEvent *mouseEvent = [NSEvent mouseEventWithType:NSMouseMoved - location:windowPoint modifierFlags:[event modifierFlags] timestamp:[event timestamp] - windowNumber:[event windowNumber] context:[event context] eventNumber:[event eventNumber] - clickCount:0 pressure:0]; - qt_mac_handleMouseEvent(self, mouseEvent, QEvent::MouseMove, Qt::NoButton); - } + // This mouse move event should be sendt, even when mouse + // tracking is switched off (to trigger tooltips): + NSEvent *mouseEvent = [NSEvent mouseEventWithType:NSMouseMoved + location:windowPoint modifierFlags:[event modifierFlags] timestamp:[event timestamp] + windowNumber:[event windowNumber] context:[event context] eventNumber:[event eventNumber] + clickCount:0 pressure:0]; + qt_mac_handleMouseEvent(self, mouseEvent, QEvent::MouseMove, Qt::NoButton); + if (qwidget->testAttribute(Qt::WA_Hover)) { QHoverEvent he(QEvent::HoverEnter, QPoint(viewPoint.x, viewPoint.y), QPoint(-1, -1)); QApplicationPrivate::instance()->notify_helper(qwidget, &he); diff --git a/src/gui/kernel/qcursor_mac.mm b/src/gui/kernel/qcursor_mac.mm index 03e38b0..c3d6c54 100644 --- a/src/gui/kernel/qcursor_mac.mm +++ b/src/gui/kernel/qcursor_mac.mm @@ -224,6 +224,15 @@ QPoint QCursor::pos() void QCursor::setPos(int x, int y) { +#ifdef QT_MAC_USE_COCOA + CGPoint pos; + pos.x = x; + pos.y = y; + + CGEventRef e = CGEventCreateMouseEvent(0, kCGEventMouseMoved, pos, 0); + CGEventPost(kCGHIDEventTap, e); + CFRelease(e); +#else CGWarpMouseCursorPosition(CGPointMake(x, y)); /* I'm not too keen on doing this, but this makes it a lot easier, so I just @@ -240,6 +249,7 @@ void QCursor::setPos(int x, int y) QApplication::mouseButtons(), QApplication::keyboardModifiers()); qt_sendSpontaneousEvent(widget, &me); } +#endif } void QCursorData::initCursorFromBitmap() diff --git a/src/gui/kernel/qkeymapper_s60.cpp b/src/gui/kernel/qkeymapper_s60.cpp index fd263ef..d019c0f 100644 --- a/src/gui/kernel/qkeymapper_s60.cpp +++ b/src/gui/kernel/qkeymapper_s60.cpp @@ -144,7 +144,7 @@ static const KeyMapping keyMapping[] = { {EKeyDevice0, EStdKeyDevice0, Key_Context1}, // Found by manual testing. {EKeyDevice1, EStdKeyDevice1, Key_Context2}, // Found by manual testing. {EKeyDevice3, EStdKeyDevice3, Key_Select}, -// {EKeyDevice7, EStdKeyDevice7, Key_Camera}, //not supported by qt yet + {EKeyDevice7, EStdKeyDevice7, Key_Camera}, {EKeyApplication0, EStdKeyApplication0, Key_Menu}, // Found by manual testing. {EKeyApplication1, EStdKeyApplication1, Key_Launch1}, // Found by manual testing. {EKeyApplication2, EStdKeyApplication2, Key_MediaPlay}, // Found by manual testing. @@ -161,7 +161,7 @@ static const KeyMapping keyMapping[] = { {EKeyApplicationD, EStdKeyApplicationD, Key_LaunchD}, {EKeyApplicationE, EStdKeyApplicationE, Key_LaunchE}, {EKeyApplicationF, EStdKeyApplicationF, Key_LaunchF}, -// {EKeyApplication19, EStdKeyApplication19, Key_CameraFocus}, //not supported by qt yet + {EKeyApplication19, EStdKeyApplication19, Key_CameraFocus}, {EKeyYes, EStdKeyYes, Key_Yes}, {EKeyNo, EStdKeyNo, Key_No}, {TKeyCode(0), TStdScanCode(0), Qt::Key(0)} |