Changeset 846 for trunk/src/gui/kernel/qcursor_mac.mm
- Timestamp:
- May 5, 2011, 5:36:53 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/gui/kernel/qcursor_mac.mm (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/kernel/qcursor_mac.mm
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 115 115 c->handle(); //force the cursor to get loaded, if it's not 116 116 117 if(1 || currentCursor != c->d) { 118 if(currentCursor && currentCursor->type == QCursorData::TYPE_ThemeCursor 119 && currentCursor->curs.tc.anim) 120 currentCursor->curs.tc.anim->stop(); 121 QMacCocoaAutoReleasePool pool; 122 if(c->d->type == QCursorData::TYPE_ImageCursor) { 123 [static_cast<NSCursor *>(c->d->curs.cp.nscursor) set]; 124 } else if(c->d->type == QCursorData::TYPE_ThemeCursor) { 125 #ifdef QT_MAC_USE_COCOA 126 if (c->d->curs.cp.nscursor == 0) 127 [[NSCursor arrowCursor] set]; 128 [static_cast<NSCursor *>(c->d->curs.cp.nscursor) set]; 129 #else 130 if(SetAnimatedThemeCursor(c->d->curs.tc.curs, 0) == themeBadCursorIndexErr) { 131 SetThemeCursor(c->d->curs.tc.curs); 132 } else { 133 if(!c->d->curs.tc.anim) 134 c->d->curs.tc.anim = new QMacAnimateCursor; 135 c->d->curs.tc.anim->start(c->d->curs.tc.curs); 136 } 137 #endif 117 if(currentCursor && currentCursor->type == QCursorData::TYPE_ThemeCursor 118 && currentCursor->curs.tc.anim) 119 currentCursor->curs.tc.anim->stop(); 120 if(c->d->type == QCursorData::TYPE_ImageCursor) { 121 [static_cast<NSCursor *>(c->d->curs.cp.nscursor) set]; 122 } else if(c->d->type == QCursorData::TYPE_ThemeCursor) { 123 if(SetAnimatedThemeCursor(c->d->curs.tc.curs, 0) == themeBadCursorIndexErr) { 124 SetThemeCursor(c->d->curs.tc.curs); 125 } else { 126 if(!c->d->curs.tc.anim) 127 c->d->curs.tc.anim = new QMacAnimateCursor; 128 c->d->curs.tc.anim->start(c->d->curs.tc.curs); 138 129 } 139 130 } … … 234 225 void QCursor::setPos(int x, int y) 235 226 { 227 228 229 230 231 232 233 234 235 236 236 CGWarpMouseCursorPosition(CGPointMake(x, y)); 237 237 … … 250 250 qt_sendSpontaneousEvent(widget, &me); 251 251 } 252 252 253 } 253 254 … … 425 426 curs.cp.nscursor = [NSCursor closedHandCursor]; 426 427 break; 428 429 430 431 432 433 434 435 436 437 438 439 427 440 #define QT_USE_APPROXIMATE_CURSORS 428 441 #ifdef QT_USE_APPROXIMATE_CURSORS … … 520 533 curs.tc.curs = kThemeClosedHandCursor; 521 534 break; 535 536 537 538 539 540 541 542 543 544 545 546 522 547 #define QT_USE_APPROXIMATE_CURSORS 523 548 #ifdef QT_USE_APPROXIMATE_CURSORS
Note:
See TracChangeset
for help on using the changeset viewer.
