Changeset 98000 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jan 5, 2023 1:45:20 PM (2 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r97976 r98000 291 291 void setMarkAsUnused(bool fUnused); 292 292 293 /** Returns whether frame-buffer is <b>auto-enabled</b>.294 * @note Refer to m_fAutoEnabled for more information. */295 bool isAutoEnabled() const { return m_fAutoEnabled; }296 /** Defines whether frame-buffer is <b>auto-enabled</b>.297 * @note Refer to m_fAutoEnabled for more information. */298 void setAutoEnabled(bool fAutoEnabled) { m_fAutoEnabled = fAutoEnabled; }299 300 293 /** Returns the frame-buffer's scaled-size. */ 301 294 QSize scaledSize() const { return m_scaledSize; } … … 512 505 * <b>Unused</b> status determines whether frame-buffer should ignore EMT events or not. */ 513 506 bool m_fUnused; 514 515 /** Defines whether frame-buffer is <b>auto-enabled</b>.516 * <b>Auto-enabled</b> status means that guest-screen corresponding to this frame-buffer517 * was automatically enabled by the multi-screen layout (auto-mount guest-screen) functionality,518 * so have potentially incorrect size-hint posted into guest event queue.519 * Machine-view will try to automatically adjust guest-screen size as soon as possible. */520 bool m_fAutoEnabled;521 507 522 508 /** RTCRITSECT object to protect frame-buffer access. */ … … 1102 1088 , m_fUpdatesAllowed(false) 1103 1089 , m_fUnused(false) 1104 , m_fAutoEnabled(false)1105 1090 , m_dScaleFactor(1.0) 1106 1091 , m_enmScalingOptimizationType(ScalingOptimizationType_None) … … 2414 2399 } 2415 2400 2416 bool UIFrameBuffer::isAutoEnabled() const2417 {2418 return m_pFrameBuffer->isAutoEnabled();2419 }2420 2421 void UIFrameBuffer::setAutoEnabled(bool fAutoEnabled)2422 {2423 m_pFrameBuffer->setAutoEnabled(fAutoEnabled);2424 }2425 2426 2401 QSize UIFrameBuffer::scaledSize() const 2427 2402 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
r96407 r98000 91 91 void setMarkAsUnused(bool fUnused); 92 92 93 /** Returns whether frame-buffer is <b>auto-enabled</b>.94 * @note Refer to m_fAutoEnabled for more information. */95 bool isAutoEnabled() const;96 /** Defines whether frame-buffer is <b>auto-enabled</b>.97 * @note Refer to m_fAutoEnabled for more information. */98 void setAutoEnabled(bool fAutoEnabled);99 100 93 /** Returns the frame-buffer's scaled-size. */ 101 94 QSize scaledSize() const; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
r97682 r98000 168 168 if (pFrameBuffer->height() > 0) 169 169 uHeight = pFrameBuffer->height(); 170 pFrameBuffer->setAutoEnabled(true);171 170 } 172 171 /* Re-enable guest-screen with proper resolution: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
r97995 r98000 138 138 bool fAdjust = false; 139 139 140 /* Step 1: Was the guest-screen enabled automatically? */ 141 if (!fAdjust) 142 { 143 if (frameBuffer()->isAutoEnabled()) 144 { 145 LogRel2(("GUI: UIMachineViewFullscreen::adjustGuestScreenSize: Guest-screen was enabled automatically, adjustment is required.\n")); 146 fAdjust = true; 147 } 148 } 149 /* Step 2: Is the guest-screen of another size than necessary? */ 140 /* Step 1: Is the guest-screen of another size than necessary? */ 150 141 if (!fAdjust) 151 142 { … … 165 156 } 166 157 167 /* Step 3: Is guest-screen visible? */158 /* Step 2: Is guest-screen visible? */ 168 159 if (fAdjust) 169 160 { … … 174 165 } 175 166 } 176 /* Step 4: Is guest-screen auto-resize enabled? */167 /* Step 3: Is guest-screen auto-resize enabled? */ 177 168 if (fAdjust) 178 169 { … … 187 178 if (fAdjust) 188 179 { 189 frameBuffer()->setAutoEnabled(false);190 180 sltPerformGuestResize(calculateMaxGuestSize()); 191 181 /* And remember the size to know what we are resizing out of when we exit: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
r97995 r98000 151 151 bool fAdjust = false; 152 152 153 /* Step 1: Was the guest-screen enabled automatically? */ 154 if (!fAdjust) 155 { 156 if (frameBuffer()->isAutoEnabled()) 157 { 158 LogRel2(("GUI: UIMachineViewSeamless::adjustGuestScreenSize: Guest-screen was enabled automatically, adjustment is required.\n")); 159 fAdjust = true; 160 } 161 } 162 /* Step 2: Is the guest-screen of another size than necessary? */ 153 /* Step 1: Is the guest-screen of another size than necessary? */ 163 154 if (!fAdjust) 164 155 { … … 178 169 } 179 170 180 /* Step 3: Is guest-screen visible? */171 /* Step 2: Is guest-screen visible? */ 181 172 if (fAdjust) 182 173 { … … 191 182 if (fAdjust) 192 183 { 193 frameBuffer()->setAutoEnabled(false);194 184 sltPerformGuestResize(calculateMaxGuestSize()); 195 185 /* And remember the size to know what we are resizing out of when we exit: */
Note:
See TracChangeset
for help on using the changeset viewer.