Changeset 26729 in vbox
- Timestamp:
- Feb 24, 2010 10:46:58 AM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r26691 r26729 41 41 # Build new VirtualBox FE/Qt4 GUI runtime core. 42 42 # Currently its not used, you can build it for developing purposes. 43 ifneq ($(KBUILD_TARGET),darwin)44 43 #VBOX_WITH_NEW_RUNTIME_CORE := 1 45 endif46 44 47 45 # … … 167 165 VirtualBox_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL 168 166 VirtualBox_DEFS.win.amd64 = VBOX_WITHOUT_QHTTP 169 ## @todo VBOX_WITH_HACKED_QT doesn't apply to Qt4, so why is this still here?170 VirtualBox_DEFS.darwin.x86 += VBOX_WITH_HACKED_QT171 167 ifdef VBOX_WITH_ICHAT_THEATER 172 168 VirtualBox_DEFS.darwin += VBOX_WITH_ICHAT_THEATER … … 264 260 endif 265 261 266 # r=bird: what is -lz doing here? it belongs in LIBS. 267 VirtualBox_LDFLAGS.darwin = -lz \ 262 VirtualBox_LDFLAGS.darwin = \ 268 263 -framework IOKit -framework AppKit -framework ApplicationServices -framework Foundation -framework Carbon \ 269 264 $(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox.dylib) … … 780 775 '-DVBOX_GUI_USE_QIMAGE' \ 781 776 '-DVBOX_WITHOUT_QHTTP' \ 782 '-DVBOX_WITH_HACKED_QT' \783 777 '-o' $@ $< 784 778 endif -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
r26720 r26729 92 92 # ifdef QT_MAC_USE_COCOA 93 93 # include "darwin/VBoxCocoaApplication.h" 94 # elif defined(VBOX_WITH_HACKED_QT) 95 # include "QIApplication.h" 96 # endif 97 # include <Carbon/Carbon.h> 94 # else /* QT_MAC_USE_COCOA */ 95 # include <Carbon/Carbon.h> 96 # endif /* !QT_MAC_USE_COCOA */ 98 97 # include <VBox/err.h> 99 98 #endif /* defined (Q_WS_MAC) */ … … 161 160 } 162 161 163 # el if !defined (VBOX_WITH_HACKED_QT)162 # else /* QT_MAC_USE_COCOA */ 164 163 /** 165 164 * Event handler callback for Mac OS X. … … 194 193 * possible to use the left command key to invoke them when the keyboard 195 194 * is captured. We discard the events these if the keyboard is captured 196 * as a half measure to prevent unexpected behavio ur. However, we don't195 * as a half measure to prevent unexpected behavior. However, we don't 197 196 * get any key down/up events, so these combinations are dead to the guest... 198 197 */ … … 204 203 return ::CallNextEventHandler (inHandlerCallRef, inEvent); 205 204 } 206 207 # else /* VBOX_WITH_HACKED_QT */ 208 /** 209 * Event handler callback for Mac OS X. 210 */ 211 /* static */ 212 bool VBoxConsoleView::macEventFilter (EventRef inEvent, void *inUserData) 213 { 214 VBoxConsoleView *view = static_cast<VBoxConsoleView *> (inUserData); 215 UInt32 eventClass = ::GetEventClass (inEvent); 216 UInt32 eventKind = ::GetEventKind (inEvent); 217 218 /* For debugging events */ 219 /* 220 if (!(eventClass == 'cute')) 221 ::darwinDebugPrintEvent ("view: ", inEvent); 222 */ 223 224 /* Not sure but this seems an triggered event if the spotlight searchbar is 225 * displayed. So flag that the host key isn't pressed alone. */ 226 if (eventClass == 'cgs ' && eventKind == 0x15 && 227 view->mIsHostkeyPressed) 228 view->mIsHostkeyAlone = false; 229 230 if (eventClass == kEventClassKeyboard) 231 { 232 if (view->darwinKeyboardEvent (NULL, inEvent)) 233 return true; 234 } 235 return false; 236 } 237 # endif /* VBOX_WITH_HACKED_QT */ 205 # endif /* !QT_MAC_USE_COCOA */ 238 206 239 207 #endif /* Q_WS_MAC */ … … 737 705 #endif 738 706 #if defined(Q_WS_MAC) 739 # if !defined (VBOX_WITH_HACKED_QT) && !defined (QT_MAC_USE_COCOA)707 # ifndef QT_MAC_USE_COCOA 740 708 , mDarwinEventHandlerRef (NULL) 741 709 # endif … … 759 727 mDockIconPreview = new VBoxDockIconPreview (mMainWnd, vboxGlobal().vmGuestOSTypeIcon (osTypeId)); 760 728 761 # ifdef QT_MAC_USE_COCOA 762 /** @todo Carbon -> Cocoa */ 763 # else /* !QT_MAC_USE_COCOA */ 729 # ifndef QT_MAC_USE_COCOA 764 730 /* Install the event handler which will proceed external window handling */ 765 731 EventHandlerUPP eventHandler = ::NewEventHandlerUPP (::darwinOverlayWindowHandler); … … 2499 2465 VBoxConsoleView::darwinEventHandlerProc, this); 2500 2466 2501 # el if !defined (VBOX_WITH_HACKED_QT)2467 # else /* QT_MAC_USE_COCOA */ 2502 2468 EventTypeSpec eventTypes[6]; 2503 2469 eventTypes[0].eventClass = kEventClassKeyboard; … … 2522 2488 this, &mDarwinEventHandlerRef); 2523 2489 ::DisposeEventHandlerUPP (eventHandler); 2524 2525 # else /* VBOX_WITH_HACKED_QT */ 2526 ((QIApplication *)qApp)->setEventFilter (VBoxConsoleView::macEventFilter, this); 2527 # endif /* VBOX_WITH_HACKED_QT */ 2490 # endif /* !QT_MAC_USE_COCOA */ 2528 2491 2529 2492 ::DarwinGrabKeyboard (false); … … 2535 2498 ::VBoxCocoaApplication_unsetCallback (UINT32_MAX, /** @todo fix mask */ 2536 2499 VBoxConsoleView::darwinEventHandlerProc, this); 2537 # el if !defined(VBOX_WITH_HACKED_QT)2500 # else /* !QT_MAC_USE_COCOA */ 2538 2501 if (mDarwinEventHandlerRef) 2539 2502 { … … 2541 2504 mDarwinEventHandlerRef = NULL; 2542 2505 } 2543 # else /* VBOX_WITH_HACKED_QT */ 2544 ((QIApplication *)qApp)->setEventFilter (NULL, NULL); 2545 # endif /* VBOX_WITH_HACKED_QT */ 2506 # endif /* !QT_MAC_USE_COCOA */ 2546 2507 } 2547 2508 } -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.h
r26213 r26729 327 327 328 328 #if defined(Q_WS_MAC) 329 # if !defined (VBOX_WITH_HACKED_QT) && !defined (QT_MAC_USE_COCOA)329 # ifndef QT_MAC_USE_COCOA 330 330 /** Event handler reference. NULL if the handler isn't installed. */ 331 331 EventHandlerRef mDarwinEventHandlerRef; 332 # endif 332 # endif /* !QT_MAC_USE_COCOA */ 333 333 /** The current modifier key mask. Used to figure out which modifier 334 334 * key was pressed when we get a kEventRawKeyModifiersChanged event. */ … … 346 346 WPARAM wParam, LPARAM lParam); 347 347 #elif defined (Q_WS_MAC) 348 # if defined (QT_MAC_USE_COCOA)348 # ifdef QT_MAC_USE_COCOA 349 349 static bool darwinEventHandlerProc (const void *pvCocoaEvent, const 350 350 void *pvCarbonEvent, void *pvUser); 351 # el if !defined (VBOX_WITH_HACKED_QT)351 # else /* QT_MAC_USE_COCOA */ 352 352 static pascal OSStatus darwinEventHandlerProc (EventHandlerCallRef inHandlerCallRef, 353 353 EventRef inEvent, void *inUserData); 354 # else /* VBOX_WITH_HACKED_QT */ 355 static bool macEventFilter (EventRef inEvent, void *inUserData); 356 # endif /* VBOX_WITH_HACKED_QT */ 354 # endif /* !QT_MAC_USE_COCOA */ 357 355 #endif 358 356 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.h
r26581 r26729 451 451 452 452 #endif // __VBoxConsoleWnd_h__ 453 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGLSupportInfo.cpp
r26719 r26729 1 /* $Id$ */ 1 2 /** @file 2 3 * -
trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
r26719 r26729 33 33 #include "VBoxConsoleWnd.h" 34 34 #include "VBoxUtils.h" 35 #if defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA)36 # include "QIApplication.h"37 #else38 # define QIApplication QApplication39 #endif40 35 #ifdef QT_MAC_USE_COCOA 41 36 # include "darwin/VBoxCocoaApplication.h" … … 340 335 int rc = 1; /* failure */ 341 336 342 /* scope the Q IApplication variable */337 /* scope the QApplication variable */ 343 338 { 344 339 #ifdef Q_WS_X11 … … 377 372 : NULL; 378 373 /* Now create the application object */ 379 Q IApplication a (pDisplay, argc, argv, (Qt::HANDLE) pVisual);374 QApplication a (pDisplay, argc, argv, (Qt::HANDLE) pVisual); 380 375 #else /* Q_WS_X11 */ 381 Q IApplication a (argc, argv);376 QApplication a (argc, argv); 382 377 #endif /* Q_WS_X11 */ 383 378 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r26719 r26729 79 79 # ifdef QT_MAC_USE_COCOA 80 80 # include "darwin/VBoxCocoaApplication.h" 81 # elif defined(VBOX_WITH_HACKED_QT) 82 # include "QIApplication.h" 83 # endif 84 # include <Carbon/Carbon.h> 81 # else /* QT_MAC_USE_COCOA */ 82 # include <Carbon/Carbon.h> 83 # endif /* !QT_MAC_USE_COCOA */ 85 84 # include <VBox/err.h> 86 85 #endif /* defined (Q_WS_MAC) */ … … 274 273 #endif 275 274 #if defined(Q_WS_MAC) 276 # if !defined (VBOX_WITH_HACKED_QT) && !defined (QT_MAC_USE_COCOA)275 # ifndef QT_MAC_USE_COCOA 277 276 , mDarwinEventHandlerRef (NULL) 278 # endif 277 # endif /* !QT_MAC_USE_COCOA */ 279 278 , mDarwinKeyModifiers (0) 280 279 , mKeyboardGrabbed (false) … … 1628 1627 UIMachineView::darwinEventHandlerProc, this); 1629 1628 1630 # el if !defined (VBOX_WITH_HACKED_QT)1629 # else /* QT_MAC_USE_COCOA */ 1631 1630 EventTypeSpec eventTypes[6]; 1632 1631 eventTypes[0].eventClass = kEventClassKeyboard; … … 1651 1650 this, &mDarwinEventHandlerRef); 1652 1651 ::DisposeEventHandlerUPP(eventHandler); 1653 1654 # else /* VBOX_WITH_HACKED_QT */ 1655 ((QIApplication *)qApp)->setEventFilter(UIMachineView::macEventFilter, this); 1656 # endif /* VBOX_WITH_HACKED_QT */ 1652 # endif /* !QT_MAC_USE_COCOA */ 1657 1653 1658 1654 ::DarwinGrabKeyboard (false); … … 1664 1660 ::VBoxCocoaApplication_unsetCallback(UINT32_MAX, /** @todo fix mask */ 1665 1661 UIMachineView::darwinEventHandlerProc, this); 1666 # el if !defined(VBOX_WITH_HACKED_QT)1662 # else /* QT_MAC_USE_COCOA */ 1667 1663 if (mDarwinEventHandlerRef) 1668 1664 { … … 1670 1666 mDarwinEventHandlerRef = NULL; 1671 1667 } 1672 # else /* VBOX_WITH_HACKED_QT */ 1673 ((QIApplication *)qApp)->setEventFilter(NULL, NULL); 1674 # endif /* VBOX_WITH_HACKED_QT */ 1668 # endif /* !QT_MAC_USE_COCOA */ 1675 1669 } 1676 1670 } … … 1693 1687 1694 1688 #if defined (Q_WS_MAC) 1695 # if defined (QT_MAC_USE_COCOA)1689 # ifdef QT_MAC_USE_COCOA 1696 1690 bool UIMachineView::darwinEventHandlerProc (const void *pvCocoaEvent, const void *pvCarbonEvent, void *pvUser) 1697 1691 { … … 1715 1709 } 1716 1710 1717 # el if !defined (VBOX_WITH_HACKED_QT)1711 # else /* QT_MAC_USE_COCOA */ 1718 1712 1719 1713 pascal OSStatus UIMachineView::darwinEventHandlerProc (EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void *inUserData) … … 1747 1741 return ::CallNextEventHandler(inHandlerCallRef, inEvent); 1748 1742 } 1749 1750 # else /* VBOX_WITH_HACKED_QT */ 1751 1752 bool UIMachineView::macEventFilter(EventRef inEvent, void *inUserData) 1753 { 1754 UIMachineView *view = static_cast<UIMachineView *>(inUserData); 1755 UInt32 eventClass = ::GetEventClass(inEvent); 1756 UInt32 eventKind = ::GetEventKind(inEvent); 1757 1758 /* Not sure but this seems an triggered event if the spotlight searchbar is 1759 * displayed. So flag that the host key isn't pressed alone. */ 1760 if (eventClass == 'cgs ' && eventKind == 0x15 && 1761 view->m_bIsHostkeyPressed) 1762 view->m_bIsHostkeyAlone = false; 1763 1764 if (eventClass == kEventClassKeyboard) 1765 { 1766 if (view->darwinKeyboardEvent (NULL, inEvent)) 1767 return true; 1768 } 1769 return false; 1770 } 1771 # endif /* VBOX_WITH_HACKED_QT */ 1743 # endif /* !QT_MAC_USE_COCOA */ 1772 1744 1773 1745 #endif /* Q_WS_MAC */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r26709 r26729 161 161 static LRESULT CALLBACK lowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam); 162 162 #elif defined (Q_WS_MAC) 163 # if defined (QT_MAC_USE_COCOA)163 # ifdef QT_MAC_USE_COCOA 164 164 static bool darwinEventHandlerProc(const void *pvCocoaEvent, const void *pvCarbonEvent, void *pvUser); 165 # el if !defined (VBOX_WITH_HACKED_QT)165 # else /* QT_MAC_USE_COCOA */ 166 166 static pascal OSStatus darwinEventHandlerProc(EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void *inUserData); 167 # else /* VBOX_WITH_HACKED_QT */ 168 static bool macEventFilter(EventRef inEvent, void *inUserData); 169 # endif /* VBOX_WITH_HACKED_QT */ 167 # endif /* !QT_MAC_USE_COCOA */ 170 168 #endif 171 169 … … 262 260 263 261 #if defined(Q_WS_MAC) 264 # if !defined (VBOX_WITH_HACKED_QT) && !defined (QT_MAC_USE_COCOA)262 # ifndef QT_MAC_USE_COCOA 265 263 /** Event handler reference. NULL if the handler isn't installed. */ 266 264 EventHandlerRef mDarwinEventHandlerRef; 267 # endif 265 # endif /* !QT_MAC_USE_COCOA */ 268 266 /** The current modifier key mask. Used to figure out which modifier 269 267 * key was pressed when we get a kEventRawKeyModifiersChanged event. */
Note:
See TracChangeset
for help on using the changeset viewer.