Changeset 1391 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 10, 2007 10:47:37 AM (18 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile
r1339 r1391 130 130 131 131 VirtualBox_SOURCES.darwin = \ 132 src/darwin/DarwinKeyboard.cpp 132 src/darwin/DarwinKeyboard.cpp \ 133 src/darwin/DarwinCursor.cpp 133 134 134 135 VirtualBox_DEFS = VBOX_GUI_SEPARATE_VM_PROCESS -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleView.h
r1339 r1391 38 38 #if defined (Q_WS_MAC) 39 39 # include <Carbon/Carbon.h> 40 # include "DarwinCursor.h" 40 41 #endif 41 42 … … 218 219 219 220 #if defined(Q_WS_MAC) 221 # ifndef VBOX_WITH_HACKED_QT 220 222 /** Event handler reference. NULL if the handler isn't installed. */ 221 223 EventHandlerRef m_darwinEventHandlerRef; 224 # endif 222 225 /** The current modifier key mask. Used to figure out which modifier 223 226 * key was pressed when we get a kEventRawKeyModifiersChanged event. */ 224 227 UInt32 m_darwinKeyModifiers; 228 /** The darwin cursor handle (see DarwinCursor.h/.cpp). */ 229 DARWINCURSOR m_darwinCursor; 225 230 #endif 226 231 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
r1339 r1391 80 80 #if defined (Q_WS_MAC) 81 81 # include "DarwinKeyboard.h" 82 # include "DarwinCursor.h" 82 83 # ifdef VBOX_WITH_HACKED_QT 83 84 # include "QIApplication.h" 84 85 # endif 86 # include <VBox/err.h> 85 87 #endif /* defined (Q_WS_MAC) */ 86 88 … … 419 421 #endif 420 422 #if defined(Q_WS_MAC) 423 # ifndef VBOX_WITH_HACKED_QT 421 424 , m_darwinEventHandlerRef (NULL) 425 # endif 422 426 , m_darwinKeyModifiers (0) 423 427 #endif … … 535 539 #if defined (Q_WS_WIN) 536 540 g_view = this; 541 #endif 542 543 #ifdef Q_WS_MAC 544 DarwinCursorClearHandle (&m_darwinCursor); 537 545 #endif 538 546 } … … 1501 1509 { 1502 1510 ::DarwinReleaseKeyboard (); 1511 #ifndef VBOX_WITH_HACKED_QT 1503 1512 if (m_darwinEventHandlerRef) 1504 1513 { … … 1506 1515 m_darwinEventHandlerRef = NULL; 1507 1516 } 1508 # ifdef VBOX_WITH_HACKED_QT1517 #else 1509 1518 ((QIApplication *)qApp)->setEventFilter (NULL, NULL); 1510 1519 #endif … … 2637 2646 } 2638 2647 2648 #elif defined(Q_WS_MAC) 2649 2650 /* 2651 * Qt3/Mac only supports black/white cursors and it offers no way 2652 * to create your own cursors here unlike on X11 and Windows. 2653 * Which means we're pretty much forced to do it our own way. 2654 */ 2655 int rc; 2656 2657 /* dispose of the old cursor. */ 2658 if (!DarwinCursorIsNull (&m_darwinCursor)) 2659 { 2660 rc = DarwinCursorDestroy (&m_darwinCursor); 2661 AssertRC (rc); 2662 } 2663 2664 /* create the new cursor */ 2665 rc = DarwinCursorCreate (me->width(), me->height(), me->xHot(), me->yHot(), me->hasAlpha(), 2666 srcAndMaskPtr, srcShapePtr, &m_darwinCursor); 2667 AssertRC (rc); 2668 if (VBOX_SUCCESS (rc)) 2669 { 2670 /** @todo check current mouse coordinates. */ 2671 rc = DarwinCursorSet (&m_darwinCursor); 2672 AssertRC (rc); 2673 } 2674 ok = VBOX_SUCCESS (rc); 2675 NOREF (srcShapePtrScan); 2676 2677 #else 2678 2679 # warning "port me" 2680 2639 2681 #endif 2640 2682 if (!ok)
Note:
See TracChangeset
for help on using the changeset viewer.