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