Changeset 38949 in vbox
- Timestamp:
- Oct 5, 2011 10:00:25 PM (13 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r38947 r38949 248 248 , m_previousState(KMachineState_Null) 249 249 , m_desktopGeometryType(DesktopGeo_Invalid) 250 , m_bIsMachineWindowResizeIgnored(false)251 250 , m_fShouldWeDoResize(false) 252 251 #ifdef VBOX_WITH_VIDEOHWACCEL -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r38947 r38949 122 122 ulong screenId() const { return m_uScreenId; } 123 123 UIFrameBuffer* frameBuffer() const { return m_pFrameBuffer; } 124 bool isMachineWindowResizeIgnored() const { return m_bIsMachineWindowResizeIgnored; }125 124 const QPixmap& pauseShot() const { return m_pauseShot; } 126 125 QSize storedConsoleSize() const { return m_storedConsoleSize; } … … 132 131 void setDesktopGeometry(DesktopGeo geometry, int iWidth, int iHeight); 133 132 void storeConsoleSize(int iWidth, int iHeight); 134 void setMachineWindowResizeIgnored(bool fIgnore = true) { m_bIsMachineWindowResizeIgnored = fIgnore; }135 133 void storeGuestSizeHint(const QSize &sizeHint); 136 134 … … 179 177 QSize m_storedConsoleSize; 180 178 181 bool m_bIsMachineWindowResizeIgnored : 1;182 179 bool m_fShouldWeDoResize : 1; 183 180 #ifdef VBOX_WITH_VIDEOHWACCEL -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
r38947 r38949 117 117 return true; 118 118 119 /* We are starting to perform machine-view resize,120 * we should temporary ignore other if they are trying to be: */121 bool fWasMachineWindowResizeIgnored = isMachineWindowResizeIgnored();122 setMachineWindowResizeIgnored(true);123 124 119 /* Get guest resize-event: */ 125 120 UIResizeEvent *pResizeEvent = static_cast<UIResizeEvent*>(pEvent); … … 152 147 /* Report to the VM thread that we finished resizing: */ 153 148 session().GetConsole().GetDisplay().ResizeCompleted(screenId()); 154 155 /* We are finishing to perform machine-view resize: */156 setMachineWindowResizeIgnored(fWasMachineWindowResizeIgnored);157 149 158 150 /* We also recalculate the desktop geometry if this is determined -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r38947 r38949 107 107 return true; 108 108 109 /* We are starting to perform machine-view resize,110 * we should temporary ignore other if they are trying to be: */111 bool fWasMachineWindowResizeIgnored = isMachineWindowResizeIgnored();112 setMachineWindowResizeIgnored(true);113 114 109 /* Get guest resize-event: */ 115 110 UIResizeEvent *pResizeEvent = static_cast<UIResizeEvent*>(pEvent); … … 145 140 /* Report to the VM thread that we finished resizing: */ 146 141 session().GetConsole().GetDisplay().ResizeCompleted(screenId()); 147 148 /* We are finishing to perform machine-view resize: */149 setMachineWindowResizeIgnored(fWasMachineWindowResizeIgnored);150 142 151 143 /* We also recalculate the desktop geometry if this is determined … … 185 177 * This hint is acted upon when (and only when) the autoresize property is "true": */ 186 178 m_fShouldWeDoResize = uisession()->isGuestSupportsGraphics(); 187 if ( !isMachineWindowResizeIgnored() && m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())179 if (pEvent->spontaneous() && m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics()) 188 180 QTimer::singleShot(300, this, SLOT(sltPerformGuestResize())); 189 181 break; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp
r33595 r38949 169 169 return true; 170 170 171 /* We are starting to perform machine-view resize,172 * we should temporary ignore other if they are trying to be: */173 bool fWasMachineWindowResizeIgnored = isMachineWindowResizeIgnored();174 setMachineWindowResizeIgnored(true);175 176 171 /* Get guest resize-event: */ 177 172 UIResizeEvent *pResizeEvent = static_cast<UIResizeEvent*>(pEvent); … … 193 188 /* Report to the VM thread that we finished resizing: */ 194 189 session().GetConsole().GetDisplay().ResizeCompleted(screenId()); 195 196 /* We are finishing to perform machine-view resize: */197 setMachineWindowResizeIgnored(fWasMachineWindowResizeIgnored);198 190 199 191 /* We also recalculate the desktop geometry if this is determined -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
r38948 r38949 128 128 return true; 129 129 130 /* We are starting to perform machine-view resize,131 * we should temporary ignore other if they are trying to be: */132 bool fWasMachineWindowResizeIgnored = isMachineWindowResizeIgnored();133 setMachineWindowResizeIgnored(true);134 135 130 /* Get guest resize-event: */ 136 131 UIResizeEvent *pResizeEvent = static_cast<UIResizeEvent*>(pEvent); … … 160 155 /* Report to the VM thread that we finished resizing: */ 161 156 session().GetConsole().GetDisplay().ResizeCompleted(screenId()); 162 163 /* We are finishing to perform machine-view resize: */164 setMachineWindowResizeIgnored(fWasMachineWindowResizeIgnored);165 157 166 158 /* We also recalculate the desktop geometry if this is determined
Note:
See TracChangeset
for help on using the changeset viewer.