Changeset 52382 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Aug 14, 2014 1:27:19 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 95525
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r52370 r52382 166 166 void UIMachineWindowFullscreen::sltRevokeFocus() 167 167 { 168 /* Make sure window is visible: */ 169 if (!isVisible()) 170 return; 171 168 172 /* Revoke stolen focus: */ 169 173 m_pMachineView->setFocus(); … … 314 318 if (!uisession()->isScreenVisible(m_uScreenId) || 315 319 !pFullscreenLogic->hasHostScreenForGuestScreen(m_uScreenId)) 316 return hide(); 320 { 321 /* Hide mini-toolbar: */ 322 if (m_pMiniToolBar) 323 m_pMiniToolBar->hide(); 324 /* Hide window: */ 325 hide(); 326 return; 327 } 317 328 318 329 /* Make sure this window is not minimized: */ … … 368 379 machineView()->maybeAdjustGuestScreenSize(); 369 380 370 /* Move mini-toolbar into appropriate place: */381 /* Show/Move mini-toolbar into appropriate place: */ 371 382 if (m_pMiniToolBar) 383 { 384 m_pMiniToolBar->show(); 372 385 m_pMiniToolBar->adjustGeometry(iHostScreen); 386 } 373 387 } 374 388 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
r52370 r52382 63 63 void UIMachineWindowSeamless::sltRevokeFocus() 64 64 { 65 /* Make sure window is visible: */ 66 if (!isVisible()) 67 return; 68 65 69 /* Revoke stolen focus: */ 66 70 m_pMachineView->setFocus(); … … 158 162 /* Calculate working area: */ 159 163 QRect workingArea = vboxGlobal().availableGeometry(iScreen); 164 160 165 /* Move to the appropriate position: */ 161 166 move(workingArea.topLeft()); 167 162 168 /* Resize to the appropriate size: */ 163 169 resize(workingArea.size()); 170 } 171 172 void UIMachineWindowSeamless::showInNecessaryMode() 173 { 174 /* Make sure this window has seamless logic: */ 175 UIMachineLogicSeamless *pSeamlessLogic = qobject_cast<UIMachineLogicSeamless*>(machineLogic()); 176 AssertPtrReturnVoid(pSeamlessLogic); 177 178 /* Make sure this window should be shown and mapped to some host-screen: */ 179 if (!uisession()->isScreenVisible(m_uScreenId) || 180 !pSeamlessLogic->hasHostScreenForGuestScreen(m_uScreenId)) 181 { 182 #ifndef Q_WS_MAC 183 /* Hide mini-toolbar: */ 184 if (m_pMiniToolBar) 185 m_pMiniToolBar->hide(); 186 #endif /* !Q_WS_MAC */ 187 /* Hide window: */ 188 hide(); 189 return; 190 } 191 192 /* Make sure this window is not minimized: */ 193 if (isMinimized()) 194 return; 195 196 /* Make sure this window is maximized and placed on valid screen: */ 197 placeOnScreen(); 198 199 /* Show in normal mode: */ 200 show(); 201 164 202 /* Adjust guest screen size if necessary: */ 165 203 machineView()->maybeAdjustGuestScreenSize(); 166 #ifndef Q_WS_MAC 167 /* Move mini-toolbar into appropriate place: */ 204 205 #ifndef Q_WS_MAC 206 /* Show/Move mini-toolbar into appropriate place: */ 168 207 if (m_pMiniToolBar) 208 { 209 m_pMiniToolBar->show(); 169 210 m_pMiniToolBar->adjustGeometry(); 170 #endif /* !Q_WS_MAC */ 171 } 172 173 void UIMachineWindowSeamless::showInNecessaryMode() 174 { 175 /* Make sure this window should be shown at all: */ 176 if (!uisession()->isScreenVisible(m_uScreenId)) 177 return hide(); 178 179 /* Make sure this window has seamless logic: */ 180 UIMachineLogicSeamless *pSeamlessLogic = qobject_cast<UIMachineLogicSeamless*>(machineLogic()); 181 if (!pSeamlessLogic) 182 return hide(); 183 184 /* Make sure this window mapped to some host-screen: */ 185 if (!pSeamlessLogic->hasHostScreenForGuestScreen(m_uScreenId)) 186 return hide(); 187 188 /* Make sure this window is not minimized: */ 189 if (isMinimized()) 190 return; 191 192 /* Make sure this window is maximized and placed on valid screen: */ 193 placeOnScreen(); 194 195 /* Show in normal mode: */ 196 show(); 211 } 212 #endif /* !Q_WS_MAC */ 197 213 } 198 214
Note:
See TracChangeset
for help on using the changeset viewer.