Changeset 26931 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 2, 2010 9:46:36 AM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r26921 r26931 57 57 58 58 /* Prepare machine window: */ 59 prepareMachineWindow ();59 prepareMachineWindows(); 60 60 61 61 /* Initialization: */ … … 136 136 } 137 137 138 void UIMachineLogicFullscreen::prepareMachineWindow() 139 { 140 /* Do not prepare window if its ready: */ 141 if (mainMachineWindow()) 138 void UIMachineLogicFullscreen::prepareMachineWindows() 139 { 140 /* Get monitor count: */ 141 ulong uMonitorCount = session().GetMachine().GetMonitorCount(); 142 143 /* Do not create window(s) if created already: */ 144 if ((ulong)machineWindows().size() == uMonitorCount) 142 145 return; 146 147 /* List should not be filled partially: */ 148 AssertMsg(machineWindows().size() == 0, ("Windows list is filled partially, something broken!\n")); 143 149 144 150 #ifdef Q_WS_MAC … … 148 154 #endif /* Q_WS_MAC */ 149 155 150 /* Create machine window: */ 151 addMachineWindow(UIMachineWindow::create(this, visualStateType())); 156 /* Create machine window(s): */ 157 for (ulong uScreenId = 0; uScreenId < uMonitorCount; ++ uScreenId) 158 addMachineWindow(UIMachineWindow::create(this, visualStateType(), uScreenId)); 159 /* Order machine window(s): */ 160 for (ulong uScreenId = uMonitorCount; uScreenId > 0; -- uScreenId) 161 machineWindows()[uScreenId - 1]->machineWindow()->raise(); 162 163 /* Notify others about machine window(s) created: */ 164 setMachineWindowsCreated(true); 152 165 153 166 /* If we are not started yet: */ … … 165 178 if (uisession()->isFirstTimeStarted()) 166 179 { 167 UIFirstRunWzd wzd( mainMachineWindow()->machineWindow(), machine);180 UIFirstRunWzd wzd(defaultMachineWindow()->machineWindow(), machine); 168 181 wzd.exec(); 169 182 } … … 172 185 CProgress progress = vboxGlobal().isStartPausedEnabled() || vboxGlobal().isDebuggerAutoShowEnabled() ? 173 186 console.PowerUpPaused() : console.PowerUp(); 174 /* Check for an immediate failure */ 187 188 #if 0 // TODO: Check immediate failure! 189 /* Check for an immediate failure: */ 175 190 if (!console.isOk()) 176 191 { 177 192 vboxProblem().cannotStartMachine(console); 178 ma inMachineWindow()->machineWindow()->close();193 machineWindowWrapper()->machineWindow()->close(); 179 194 return; 180 195 } … … 182 197 /* Disable auto-closure because we want to have a chance to show the error dialog on startup failure: */ 183 198 setPreventAutoClose(true); 199 #endif 184 200 185 201 /* Show "Starting/Restoring" progress dialog: */ 186 202 if (uisession()->isSaved()) 187 vboxProblem().showModalProgressDialog(progress, machine.GetName(), mainMachineWindow()->machineWindow(), 0);203 vboxProblem().showModalProgressDialog(progress, machine.GetName(), defaultMachineWindow()->machineWindow(), 0); 188 204 else 189 vboxProblem().showModalProgressDialog(progress, machine.GetName(), mainMachineWindow()->machineWindow()); 190 205 vboxProblem().showModalProgressDialog(progress, machine.GetName(), defaultMachineWindow()->machineWindow()); 206 207 #if 0 // TODO: Check immediate failure! 191 208 /* Check for an progress failure */ 192 209 if (progress.GetResultCode() != 0) 193 210 { 194 211 vboxProblem().cannotStartMachine(progress); 195 ma inMachineWindow()->machineWindow()->close();212 machineWindowWrapper()->machineWindow()->close(); 196 213 return; 197 214 } 198 199 /* Process pending events: */200 qApp->processEvents();201 215 202 216 /* Enable auto-closure again: */ … … 206 220 if (uisession()->isTurnedOff()) 207 221 { 208 ma inMachineWindow()->machineWindow()->close();222 machineWindowWrapper()->machineWindow()->close(); 209 223 return; 210 224 } 225 #endif 211 226 212 227 #if 0 // TODO: Rework debugger logic! … … 228 243 229 244 if (!vboxGlobal().isStartPausedEnabled()) 230 ma inMachineWindow()->machineView()->pause (false);245 machineWindowWrapper()->machineView()->pause (false); 231 246 } 232 247 # endif … … 243 258 { 244 259 /* Do not cleanup machine window if it is not present: */ 245 if (! mainMachineWindow())260 if (!isMachineWindowsCreated()) 246 261 return; 247 262 248 263 /* Cleanup machine window: */ 249 UIMachineWindow::destroy(mainMachineWindow()); 250 } 251 264 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 265 UIMachineWindow::destroy(pMachineWindow); 266 } 267 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h
r26889 r26931 53 53 /* Prepare helpers: */ 54 54 void prepareActionConnections(); 55 void prepareMachineWindow ();55 void prepareMachineWindows(); 56 56 void prepareRequiredFeatures(); 57 57 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
r26921 r26931 126 126 127 127 /* Send new size-hint to the guest: */ 128 session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, 0);128 session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, screenId()); 129 129 } 130 130 /* We had requested resize now, rejecting accident requests: */ … … 331 331 332 332 /* Report to the VM thread that we finished resizing */ 333 session().GetConsole().GetDisplay().ResizeCompleted( 0);333 session().GetConsole().GetDisplay().ResizeCompleted(screenId()); 334 334 335 335 setMachineWindowResizeIgnored(oldIgnoreMainwndResize); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r26921 r26931 284 284 #endif 285 285 , machineLogic()->visualStateType() 286 , 0 /* Pass a primary screen id (0) for now! */);286 , m_uScreenId); 287 287 288 288 /* Add machine view into layout: */ … … 335 335 #endif/* !Q_WS_MAC */ 336 336 337 // m_pMachineView->normalizeGeometry(true); 338 // ((UIMachineViewFullscreen*)m_pMachineView)->sltPerformGuestResize(maximumSize()); 339 // show(); 340 337 341 QRect r = geometry(); 338 342 /* Load global settings: */
Note:
See TracChangeset
for help on using the changeset viewer.