- Timestamp:
- May 4, 2010 1:17:17 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 61053
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r28849 r29014 434 434 connect(uisession(), SIGNAL(sigRuntimeError(bool, const QString &, const QString &)), 435 435 this, SLOT(sltRuntimeError(bool, const QString &, const QString &))); 436 437 #ifdef Q_WS_MAC 438 /* Show windows: */ 439 connect(uisession(), SIGNAL(sigShowWindows()), 440 this, SLOT(sltShowWindows())); 441 #endif /* Q_WS_MAC */ 436 442 } 437 443 … … 826 832 } 827 833 834 #ifdef Q_WS_MAC 835 void UIMachineLogic::sltShowWindows() 836 { 837 for (int i=0; i < m_machineWindowsList.size(); ++i) 838 { 839 UIMachineWindow *pMachineWindow = m_machineWindowsList.at(i); 840 /* Dunno what Qt thinks a window that has minimized to the dock 841 * should be - it is not hidden, neither is it minimized. OTOH it is 842 * marked shown and visible, but not activated. This latter isn't of 843 * much help though, since at this point nothing is marked activated. 844 * I might have overlooked something, but I'm buggered what if I know 845 * what. So, I'll just always show & activate the stupid window to 846 * make it get out of the dock when the user wishes to show a VM. */ 847 pMachineWindow->machineWindow()->raise(); 848 pMachineWindow->machineWindow()->activateWindow(); 849 } 850 } 851 #endif /* Q_WS_MAC */ 852 828 853 void UIMachineLogic::sltCheckRequestedModes() 829 854 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r28800 r29014 135 135 virtual void sltUSBDeviceStateChange(const CUSBDevice &device, bool fIsAttached, const CVirtualBoxErrorInfo &error); 136 136 virtual void sltRuntimeError(bool fIsFatal, const QString &strErrorId, const QString &strMessage); 137 #ifdef RT_OS_DARWIN 138 virtual void sltShowWindows(); 139 #endif /* RT_OS_DARWIN */ 137 140 138 141 /* Mode request watch dog: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r28994 r29014 231 231 232 232 /* CPU change event: */ 233 /* No zused:233 /* Not used: 234 234 class UICPUChangeEvent : public QEvent 235 235 { … … 331 331 332 332 /* Can show window event: */ 333 /* Not used: 333 334 class UICanUIShowWindowEvent : public QEvent 334 335 { … … 338 339 : QEvent((QEvent::Type)UIConsoleEventType_CanShowWindow) {} 339 340 }; 341 */ 340 342 341 343 /* Show window event: */ 344 #ifdef Q_WS_MAC 342 345 class UIShowWindowEvent : public QEvent 343 346 { … … 347 350 : QEvent((QEvent::Type)UIConsoleEventType_ShowWindow) {} 348 351 }; 352 #endif /* Q_WS_MAC */ 349 353 350 354 class UIConsoleCallback : VBOX_SCRIPTABLE_IMPL(IConsoleCallback) … … 499 503 return E_POINTER; 500 504 501 #if defined (Q_WS_MAC)505 #ifdef Q_WS_MAC 502 506 /* Let's try the simple approach first - grab the focus. 503 507 * Getting a window out of the dock (minimized or whatever it's called) … … 516 520 *puWinId = ::darwinGetCurrentProcessId(); 517 521 } 518 #else 522 #else /* Q_WS_MAC */ 519 523 /* Return the ID of the top-level console window. */ 520 524 *puWinId = (ULONG64)m_pEventHandler->winId(); 521 #endif 525 #endif /* !Q_WS_MAC */ 522 526 523 527 return S_OK; … … 1138 1142 1139 1143 #ifdef Q_WS_MAC 1140 /* posted OnShowWindow */1141 1144 case UIConsoleEventType_ShowWindow: 1142 1145 { 1143 /* Dunno what Qt3 thinks a window that has minimized to the dock 1144 * should be - it is not hidden, neither is it minimized. OTOH it is 1145 * marked shown and visible, but not activated. This latter isn't of 1146 * much help though, since at this point nothing is marked activated. 1147 * I might have overlooked something, but I'm buggered what if I know 1148 * what. So, I'll just always show & activate the stupid window to 1149 * make it get out of the dock when the user wishes to show a VM. */ 1150 #if 0 1151 // TODO_NEW_CORE 1152 window()->show(); 1153 window()->activateWindow(); 1154 #endif 1146 emit sigShowWindows(); 1147 /* Accept event: */ 1148 pEvent->accept(); 1155 1149 return true; 1156 1150 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r28963 r29014 168 168 void sigSharedFolderChange(); 169 169 void sigRuntimeError(bool bIsFatal, const QString &strErrorId, const QString &strMessage); 170 #ifdef RT_OS_DARWIN 171 void sigShowWindows(); 172 #endif /* RT_OS_DARWIN */ 170 173 171 174 /* Session signals: */
Note:
See TracChangeset
for help on using the changeset viewer.