Changeset 50535 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Feb 21, 2014 7:19:56 AM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 92384
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r50522 r50535 227 227 setPresentationModeEnabled(true); 228 228 } 229 #endif /* Q_WS_MAC */ 229 230 230 231 void UIMachineLogicFullscreen::sltScreenLayoutChanged() 231 232 { 232 setPresentationModeEnabled(true); 233 } 234 #endif /* Q_WS_MAC */ 233 /* Update machine-window(s) location/size: */ 234 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 235 pMachineWindow->showInNecessaryMode(); 236 237 #ifdef Q_WS_MAC 238 /* Update 'presentation mode' for Lion and previous: */ 239 if (vboxGlobal().osRelease() <= MacOSXRelease_Lion) 240 setPresentationModeEnabled(true); 241 #endif /* Q_WS_MAC */ 242 } 235 243 236 244 void UIMachineLogicFullscreen::sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo) … … 307 315 return; 308 316 309 #ifdef Q_WS_MAC // TODO: Is that "darwinSetFrontMostProcess" really need here?317 #ifdef Q_WS_MAC 310 318 /* We have to make sure that we are getting the front most process. 311 319 * This is necessary for Qt versions > 4.3.3: */ 312 ::darwinSetFrontMostProcess();320 darwinSetFrontMostProcess(); 313 321 #endif /* Q_WS_MAC */ 314 322 … … 321 329 322 330 /* Connect multi-screen layout change handler: */ 323 for (int i = 0; i < machineWindows().size(); ++i) 324 connect(m_pScreenLayout, SIGNAL(sigScreenLayoutChanged()), 325 static_cast<UIMachineWindowFullscreen*>(machineWindows()[i]), SLOT(sltShowInNecessaryMode())); 326 327 #ifdef Q_WS_MAC 328 /* Make sure 'presentation mode' is enabled/updated for Lion and previous: */ 329 if (vboxGlobal().osRelease() <= MacOSXRelease_Lion) 330 { 331 connect(m_pScreenLayout, SIGNAL(sigScreenLayoutChanged()), 332 this, SLOT(sltScreenLayoutChanged())); 331 connect(m_pScreenLayout, SIGNAL(sigScreenLayoutChanged()), 332 this, SLOT(sltScreenLayoutChanged())); 333 334 #ifdef Q_WS_MAC 335 /* Activate 'presentation mode' for Lion and previous: */ 336 if (vboxGlobal().osRelease() <= MacOSXRelease_Lion) 333 337 setPresentationModeEnabled(true); 334 } 335 #endif /* Q_WS_MAC */ 336 337 #ifdef Q_WS_MAC 338 /* On ML and later: */ 339 if (vboxGlobal().osRelease() > MacOSXRelease_Lion) 340 { 338 /* For ML and next: */ 339 else 340 { 341 /* For all the machine-window(s): */ 341 342 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 342 343 { 343 /* Keep sync for machine-logic/window(s): */344 /* Watch for native fullscreen signals: */ 344 345 connect(pMachineWindow, SIGNAL(sigNotifyAboutNativeFullscreenDidEnter()), 345 346 this, SLOT(sltHandleNativeFullscreenDidEnter())); … … 347 348 this, SLOT(sltHandleNativeFullscreenDidExit())); 348 349 /* Enter native fullscreen mode: */ 349 if ( darwinScreensHaveSeparateSpaces() || pMachineWindow->screenId() == 0)350 if (!darwinIsInFullscreenMode(pMachineWindow))351 350 if ( (darwinScreensHaveSeparateSpaces() || pMachineWindow->screenId() == 0) 351 && !darwinIsInFullscreenMode(pMachineWindow)) 352 darwinToggleFullscreenMode(pMachineWindow); 352 353 } 353 354 } … … 377 378 setMachineWindowsCreated(false); 378 379 379 #ifdef Q_WS_MAC 380 /* On ML and later: */ 381 if (vboxGlobal().osRelease() > MacOSXRelease_Lion) 382 { 383 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 384 { 385 /* Leave sync for machine-logic/window(s): */ 386 disconnect(pMachineWindow, SIGNAL(sigNotifyAboutNativeFullscreenDidEnter()), 387 this, SLOT(sltHandleNativeFullscreenDidEnter())); 388 disconnect(pMachineWindow, SIGNAL(sigNotifyAboutNativeFullscreenDidExit()), 389 this, SLOT(sltHandleNativeFullscreenDidExit())); 390 } 391 } 392 #endif/* Q_WS_MAC */ 393 394 /* Cleanup machine-window(s): */ 380 /* Destroy machine-window(s): */ 395 381 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 396 382 UIMachineWindow::destroy(pMachineWindow); 397 383 398 384 #ifdef Q_WS_MAC 399 /* Make sure 'presentation mode' is disabledfor Lion and previous: */385 /* Deactivate 'presentation mode' for Lion and previous: */ 400 386 if (vboxGlobal().osRelease() <= MacOSXRelease_Lion) 401 387 setPresentationModeEnabled(false); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h
r50498 r50535 65 65 #ifdef Q_WS_MAC 66 66 void sltChangePresentationMode(bool fEnabled); 67 #endif /* Q_WS_MAC */ 68 69 /** Updates machine-window(s) location/size on screen-layout changes. */ 67 70 void sltScreenLayoutChanged(); 68 #endif /* Q_WS_MAC */ 71 69 72 void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo); 70 73 void sltHostScreenCountChanged(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h
r50522 r50535 54 54 void sltMachineStateChanged(); 55 55 56 /* Show in necessary mode: */57 void sltShowInNecessaryMode() { showInNecessaryMode(); }58 59 56 /* Popup main-menu: */ 60 57 void sltPopupMainMenu(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
r50490 r50535 146 146 } 147 147 148 void UIMachineLogicSeamless::sltScreenLayoutChanged() 149 { 150 /* Update machine-window(s) location/size: */ 151 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 152 pMachineWindow->showInNecessaryMode(); 153 } 154 148 155 void UIMachineLogicSeamless::sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo) 149 156 { … … 213 220 return; 214 221 215 #ifdef Q_WS_MAC // TODO: Is that really need here?222 #ifdef Q_WS_MAC 216 223 /* We have to make sure that we are getting the front most process. 217 224 * This is necessary for Qt versions > 4.3.3: */ 218 ::darwinSetFrontMostProcess();225 darwinSetFrontMostProcess(); 219 226 #endif /* Q_WS_MAC */ 220 227 … … 222 229 m_pScreenLayout->update(); 223 230 224 /* Create machine 231 /* Create machine-window(s): */ 225 232 for (uint cScreenId = 0; cScreenId < session().GetMachine().GetMonitorCount(); ++cScreenId) 226 233 addMachineWindow(UIMachineWindow::create(this, cScreenId)); 227 234 228 235 /* Connect multi-screen layout change handler: */ 229 for (int i = 0; i < machineWindows().size(); ++i) 230 connect(m_pScreenLayout, SIGNAL(sigScreenLayoutChanged()), 231 static_cast<UIMachineWindowSeamless*>(machineWindows()[i]), SLOT(sltShowInNecessaryMode())); 236 connect(m_pScreenLayout, SIGNAL(sigScreenLayoutChanged()), 237 this, SLOT(sltScreenLayoutChanged())); 232 238 233 239 /* Mark machine-window(s) created: */ … … 254 260 setMachineWindowsCreated(false); 255 261 256 /* Cleanupmachine-window(s): */262 /* Destroy machine-window(s): */ 257 263 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 258 264 UIMachineWindow::destroy(pMachineWindow); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.h
r49506 r50535 54 54 void sltMachineStateChanged(); 55 55 56 /** Updates machine-window(s) location/size on screen-layout changes. */ 57 void sltScreenLayoutChanged(); 58 56 59 void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo); 57 60 void sltHostScreenCountChanged(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h
r48705 r50535 42 42 void sltMachineStateChanged(); 43 43 #endif /* !Q_WS_MAC */ 44 45 /* Show in necessary mode: */46 void sltShowInNecessaryMode() { showInNecessaryMode(); }47 44 48 45 /* Popup main menu: */
Note:
See TracChangeset
for help on using the changeset viewer.