Changeset 51587 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jun 10, 2014 11:52:29 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
r51569 r51587 79 79 * We have to make sure they are valid, which means there have to be unique combinations 80 80 * and all guests screens need there own host screen. */ 81 CMachine machine = m_pMachineLogic->session().GetMachine();82 81 CDisplay display = m_pMachineLogic->session().GetConsole().GetDisplay(); 83 82 bool fShouldWeAutoMountGuestScreens = gEDataManager->shouldWeAutoMountGuestScreens(vboxGlobal().managedVMUuid()); … … 102 101 { 103 102 /* Check the position of the guest window in normal mode. 104 * This makes sure that on first use the window opens on the samescreen as the normal window was before.105 * This even works with multi-screen. The user just have to move all the normal windows to the target screens106 * and they will magically open there in seamless/fullscreenalso. */107 Q String strTest1 = machine.GetExtraData(GUI_LastNormalWindowPosition + (iGuestScreen > 0 ? QString::number(iGuestScreen): ""));108 QRegExp posParser("(-?\\d+),(-?\\d+),(-?\\d+),(-?\\d+)");109 if ( posParser.exactMatch(strTest1))103 * This makes sure that on first use fullscreen/seamless window opens on the same host-screen as the normal window was before. 104 * This even works with multi-screen. The user just have to move all the normal windows to the target host-screens 105 * and they will magically open there in fullscreen/seamless also. */ 106 QRect geo = gEDataManager->machineWindowGeometry(m_pMachineLogic->visualStateType(), iGuestScreen, vboxGlobal().managedVMUuid()); 107 /* If geometry is valid: */ 108 if (!geo.isNull()) 110 109 { 111 /* If parsing was successfully, convert it to a position: */ 112 bool fOk1, fOk2; 113 QPoint p(posParser.cap(1).toInt(&fOk1), posParser.cap(2).toInt(&fOk2)); 114 /* Check to which screen the position belongs: */ 115 iHostScreen = pDW->screenNumber(p); 110 /* Get top-left corner position: */ 111 QPoint topLeftPosition(geo.topLeft()); 112 /* Check which host-screen the position belongs to: */ 113 iHostScreen = pDW->screenNumber(topLeftPosition); 116 114 /* Revalidate: */ 117 fValid = fOk1 && fOk2 /* Valid data */ 118 && iHostScreen >= 0 && iHostScreen < m_cHostScreens /* In the host screen bounds? */ 115 fValid = iHostScreen >= 0 && iHostScreen < m_cHostScreens /* In the host screen bounds? */ 119 116 && m_screenMap.key(iHostScreen, -1) == -1; /* Not taken already? */ 120 117 }
Note:
See TracChangeset
for help on using the changeset viewer.