Changeset 38961 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Oct 6, 2011 1:00:28 PM (13 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r38957 r38961 158 158 AssertMsg(newSize.isValid(), ("Size should be valid!\n")); 159 159 160 /* Remember the new size: */161 storeConsoleSize(newSize.width(), newSize.height());162 163 160 /* Send new size-hint to the guest: */ 164 161 session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, screenId()); … … 674 671 void UIMachineView::storeConsoleSize(int iWidth, int iHeight) 675 672 { 676 m_storedConsoleSize = QSize(iWidth, iHeight); 673 if (m_desktopGeometryType == DesktopGeo_Automatic) 674 m_storedConsoleSize = QSize(iWidth, iHeight); 677 675 } 678 676 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
r38957 r38961 126 126 setMaximumSize(sizeHint()); 127 127 128 /* Store the new size to prevent unwanted resize hints being sent back: */129 storeConsoleSize(pResizeEvent->width(), pResizeEvent->height());130 131 128 /* Perform machine-view resize: */ 132 129 resize(pResizeEvent->width(), pResizeEvent->height()); … … 186 183 if (pResizeEvent->size() != workingArea().size()) 187 184 break; 185 /* Store the new size */ 186 storeConsoleSize(pResizeEvent->size().width(), pResizeEvent->size().height()); 188 187 189 188 if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics()) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r38957 r38961 77 77 UIMachineViewNormal::~UIMachineViewNormal() 78 78 { 79 /* Save machine view settings: */80 saveMachineViewSettings();81 82 79 /* Cleanup frame buffer: */ 83 80 cleanupFrameBuffer(); … … 116 113 setMaximumSize(sizeHint()); 117 114 118 /* Store the new size to prevent unwanted resize hints being sent back: */119 storeConsoleSize(pResizeEvent->width(), pResizeEvent->height());120 121 115 /* Perform machine-view resize: */ 122 116 resize(pResizeEvent->width(), pResizeEvent->height()); … … 174 168 case QEvent::Resize: 175 169 { 170 const QSize *pSize = &static_cast<QResizeEvent *>(pEvent) 171 ->size(); 172 /* Store the new size */ 173 storeConsoleSize(pSize->width(), pSize->height()); 176 174 if (pEvent->spontaneous() && m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics()) 177 175 QTimer::singleShot(300, this, SLOT(sltPerformGuestResize())); … … 252 250 } 253 251 254 void UIMachineViewNormal::saveMachineViewSettings()255 {256 /* Store guest size hint: */257 storeGuestSizeHint(QSize(frameBuffer()->width(), frameBuffer()->height()));258 }259 260 252 void UIMachineViewNormal::setGuestAutoresizeEnabled(bool fEnabled) 261 253 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h
r38947 r38961 67 67 68 68 /* Cleanup helpers: */ 69 void saveMachineViewSettings();69 // void saveMachineViewSettings(); 70 70 //void cleanupConsoleConnections() {} 71 71 //void prepareConnections() {} -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp
r38949 r38961 76 76 UIMachineViewScale::~UIMachineViewScale() 77 77 { 78 /* Save machine view settings: */79 saveMachineViewSettings();80 81 78 /* Cleanup frame buffer: */ 82 79 cleanupFrameBuffer(); … … 175 172 frameBuffer()->setScaledSize(size()); 176 173 frameBuffer()->resizeEvent(pResizeEvent); 177 178 /* Store the new size to prevent unwanted resize hints being sent back: */179 storeConsoleSize(pResizeEvent->width(), pResizeEvent->height());180 174 181 175 /* Let our toplevel widget calculate its sizeHint properly: */ … … 353 347 } 354 348 355 void UIMachineViewScale::saveMachineViewSettings()356 {357 /* Store guest size hint: */358 storeGuestSizeHint(QSize(frameBuffer()->width(), frameBuffer()->height()));359 }360 361 349 QSize UIMachineViewScale::sizeHint() const 362 350 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.h
r31341 r38961 64 64 65 65 /* Cleanup helpers: */ 66 void saveMachineViewSettings();66 // void saveMachineViewSettings(); 67 67 //void cleanupConnections() {} 68 68 //void cleanupFrameBuffer() {} -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
r38957 r38961 137 137 setMaximumSize(sizeHint()); 138 138 139 /* Store the new size to prevent unwanted resize hints being sent back: */140 storeConsoleSize(pResizeEvent->width(), pResizeEvent->height());141 142 139 /* Perform machine-view resize: */ 143 140 resize(pResizeEvent->width(), pResizeEvent->height()); … … 194 191 if (pResizeEvent->size() != workingArea().size()) 195 192 break; 193 /* Store the new size to prevent unwanted resize hints being sent back: */ 194 storeConsoleSize(pResizeEvent->size().width(), pResizeEvent->size().height()); 196 195 197 196 if (uisession()->isGuestSupportsGraphics())
Note:
See TracChangeset
for help on using the changeset viewer.