Changeset 27415 in vbox
- Timestamp:
- Mar 16, 2010 4:35:53 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 58889
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r27380 r27415 128 128 void updateMouseCursorClipping(); 129 129 #endif 130 virtual QRect availableGeometry() = 0;130 virtual QRect workingArea() = 0; 131 131 virtual void calculateDesktopGeometry() = 0; 132 132 virtual void maybeRestrictMinimumSize() = 0; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
r27380 r27415 137 137 /* Check if we should resize guest to fullscreen, all the 138 138 * required features will be tested in sltPerformGuestResize(...): */ 139 if ((int)frameBuffer()->width() != availableGeometry().size().width() ||140 (int)frameBuffer()->height() != availableGeometry().size().height())141 sltPerformGuestResize( availableGeometry().size());139 if ((int)frameBuffer()->width() != workingArea().size().width() || 140 (int)frameBuffer()->height() != workingArea().size().height()) 141 sltPerformGuestResize(workingArea().size()); 142 142 } 143 143 … … 198 198 /* Send guest-resize hint only if top window resizing to required dimension: */ 199 199 QResizeEvent *pResizeEvent = static_cast<QResizeEvent*>(pEvent); 200 if (pResizeEvent->size() != availableGeometry().size())200 if (pResizeEvent->size() != workingArea().size()) 201 201 break; 202 202 … … 290 290 } 291 291 292 QRect UIMachineViewFullscreen:: availableGeometry()292 QRect UIMachineViewFullscreen::workingArea() 293 293 { 294 294 return QApplication::desktop()->screenGeometry(this); … … 302 302 if (desktopGeometryType() == DesktopGeo_Automatic) 303 303 { 304 m_desktopGeometry = QSize( availableGeometry().width(), availableGeometry().height());304 m_desktopGeometry = QSize(workingArea().width(), workingArea().height()); 305 305 } 306 306 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h
r27379 r27415 78 78 /* Private helpers: */ 79 79 void normalizeGeometry(bool /* fAdjustPosition */) {} 80 QRect availableGeometry();80 QRect workingArea(); 81 81 void calculateDesktopGeometry(); 82 82 void maybeRestrictMinimumSize(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r27375 r27415 317 317 } 318 318 319 QRect UIMachineViewNormal:: availableGeometry()319 QRect UIMachineViewNormal::workingArea() 320 320 { 321 321 return QApplication::desktop()->availableGeometry(this); … … 335 335 QRect centralWidgetGeo = static_cast<QMainWindow*>(machineWindowWrapper()->machineWindow())->centralWidget()->geometry(); 336 336 /* To work out how big we can make the console window while still fitting on the desktop, 337 * we calculate availableGeometry() - (windowGeo - centralWidgetGeo).337 * we calculate workingArea() - (windowGeo - centralWidgetGeo). 338 338 * This works because the difference between machine window and machine central widget 339 339 * (or at least its width and height) is a constant. */ 340 m_desktopGeometry = QSize( availableGeometry().width() - (windowGeo.width() - centralWidgetGeo.width()),341 availableGeometry().height() - (windowGeo.height() - centralWidgetGeo.height()));340 m_desktopGeometry = QSize(workingArea().width() - (windowGeo.width() - centralWidgetGeo.width()), 341 workingArea().height() - (windowGeo.height() - centralWidgetGeo.height())); 342 342 } 343 343 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h
r27335 r27415 76 76 /* Private helpers: */ 77 77 void normalizeGeometry(bool fAdjustPosition); 78 QRect availableGeometry();78 QRect workingArea(); 79 79 void calculateDesktopGeometry(); 80 80 void maybeRestrictMinimumSize(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
r27380 r27415 210 210 /* Send guest-resize hint only if top window resizing to required dimension: */ 211 211 QResizeEvent *pResizeEvent = static_cast<QResizeEvent*>(pEvent); 212 if (pResizeEvent->size() != availableGeometry().size())212 if (pResizeEvent->size() != workingArea().size()) 213 213 break; 214 214 … … 291 291 } 292 292 293 QRect UIMachineViewSeamless::availableGeometry() 294 { 295 // return machineWindowWrapper()->machineLogic()->availableGeometry(screenId()); 296 293 QRect UIMachineViewSeamless::workingArea() 294 { 297 295 return QApplication::desktop()->availableGeometry(this); 298 296 } … … 305 303 if (desktopGeometryType() == DesktopGeo_Automatic) 306 304 { 307 m_desktopGeometry = QSize( availableGeometry().width(), availableGeometry().height());308 } 309 } 310 305 m_desktopGeometry = QSize(workingArea().width(), workingArea().height()); 306 } 307 } 308 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h
r27379 r27415 75 75 /* Private helpers: */ 76 76 void normalizeGeometry(bool /* fAdjustPosition */) {} 77 QRect availableGeometry();77 QRect workingArea(); 78 78 void calculateDesktopGeometry(); 79 79 void maybeRestrictMinimumSize() {}
Note:
See TracChangeset
for help on using the changeset viewer.