- Timestamp:
- Oct 6, 2011 12:49:05 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 74328
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r38949 r38957 158 158 AssertMsg(newSize.isValid(), ("Size should be valid!\n")); 159 159 160 /* Do not send the same hints as we already have: */ 161 if ((newSize.width() == storedConsoleSize().width()) && (newSize.height() == storedConsoleSize().height())) 162 return; 163 164 /* We only actually send the hint if either an explicit new size was given 165 * (e.g. if the request was triggered directly by a console resize event) or 166 * if no explicit size was specified but a resize is flagged as being needed 167 * (e.g. the autoresize was just enabled and the console was resized while it was disabled). */ 168 if (toSize.isValid() || m_fShouldWeDoResize) 169 { 170 /* Remember the new size: */ 171 storeConsoleSize(newSize.width(), newSize.height()); 172 173 /* Send new size-hint to the guest: */ 174 session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, screenId()); 175 } 176 177 /* We had requested resize now, rejecting other accident requests: */ 178 m_fShouldWeDoResize = false; 160 /* Remember the new size: */ 161 storeConsoleSize(newSize.width(), newSize.height()); 162 163 /* Send new size-hint to the guest: */ 164 session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, screenId()); 179 165 } 180 166 … … 248 234 , m_previousState(KMachineState_Null) 249 235 , m_desktopGeometryType(DesktopGeo_Invalid) 250 , m_fShouldWeDoResize(false)251 236 #ifdef VBOX_WITH_VIDEOHWACCEL 252 237 , m_fAccelerate2DVideo(bAccelerate2DVideo) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r38949 r38957 177 177 QSize m_storedConsoleSize; 178 178 179 bool m_fShouldWeDoResize : 1;180 179 #ifdef VBOX_WITH_VIDEOHWACCEL 181 180 bool m_fAccelerate2DVideo : 1; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
r38949 r38957 187 187 break; 188 188 189 /* Set the "guest needs to resize" hint. 190 * This hint is acted upon when (and only when) the autoresize property is "true": */ 191 m_fShouldWeDoResize = uisession()->isGuestSupportsGraphics(); 192 if (m_bIsGuestAutoresizeEnabled && m_fShouldWeDoResize) 189 if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics()) 193 190 QTimer::singleShot(0, this, SLOT(sltPerformGuestResize())); 194 191 break; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r38949 r38957 174 174 case QEvent::Resize: 175 175 { 176 /* Set the "guest needs to resize" hint.177 * This hint is acted upon when (and only when) the autoresize property is "true": */178 m_fShouldWeDoResize = uisession()->isGuestSupportsGraphics();179 176 if (pEvent->spontaneous() && m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics()) 180 177 QTimer::singleShot(300, this, SLOT(sltPerformGuestResize())); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
r38949 r38957 195 195 break; 196 196 197 /* Set the "guest needs to resize" hint. */ 198 m_fShouldWeDoResize = uisession()->isGuestSupportsGraphics(); 199 if (m_fShouldWeDoResize) 197 if (uisession()->isGuestSupportsGraphics()) 200 198 QTimer::singleShot(0, this, SLOT(sltPerformGuestResize())); 201 199 break;
Note:
See TracChangeset
for help on using the changeset viewer.