Changeset 7463 in vbox
- Timestamp:
- Mar 14, 2008 5:03:06 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 28902
- Location:
- trunk/src/VBox/Frontends
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleView.h
r7335 r7463 98 98 void setIgnoreMainwndResize (bool aYes) { mIgnoreMainwndResize = aYes; } 99 99 100 QRect getDesktopGeometry(); 101 100 102 signals: 101 103 … … 190 192 191 193 void doResizeHint (const QSize &aSize = QSize()); 194 void doResizeDesktop (int); 192 195 193 196 private: … … 286 289 #endif 287 290 QSize mLastSizeHint; 291 QRect mDesktopGeometry; 288 292 }; 289 293 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
r7450 r7463 753 753 setFocusPolicy (WheelFocus); 754 754 755 /* Remember the desktop geometry and register for geometry change 756 events for telling the guest about video modes we like. */ 757 mDesktopGeometry = QApplication::desktop()->screenGeometry (this); 758 connect (QApplication::desktop(), SIGNAL(workAreaResized(int)), 759 this, SLOT(doResizeDesktop(int))); 760 755 761 #if defined (VBOX_GUI_DEBUG) && defined (VBOX_GUI_FRAMEBUF_STAT) 756 762 VMCPUTimer::calibrate (200); … … 2252 2258 } 2253 2259 mToggleFSModeTimer->start (2000, true); 2260 } 2261 2262 /** 2263 * Get the current desktop geometry for the console view widget 2264 * 2265 * @returns the geometry 2266 */ 2267 QRect VBoxConsoleView::getDesktopGeometry() 2268 { 2269 return mDesktopGeometry; 2254 2270 } 2255 2271 … … 3586 3602 } 3587 3603 3604 void VBoxConsoleView::doResizeDesktop (int) 3605 { 3606 mDesktopGeometry = QApplication::desktop()->screenGeometry (this); 3607 } 3588 3608 3589 3609 /** -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFrameBuffer.cpp
r7460 r7463 197 197 return E_POINTER; 198 198 *aSupported = TRUE; 199 QRect screen = QApplication::desktop()->screenGeometry (mView);199 QRect screen = mView->getDesktopGeometry(); 200 200 /* Leave 200 pixels leeway. */ 201 201 if (aWidth > (ULONG) screen.width() - 200) -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleView.h
r7435 r7463 94 94 void setIgnoreMainwndResize (bool aYes) { mIgnoreMainwndResize = aYes; } 95 95 96 QRect getDesktopGeometry(); 97 96 98 signals: 97 99 … … 186 188 187 189 void doResizeHint (const QSize &aSize = QSize()); 190 void doResizeDesktop (int); 188 191 189 192 private: … … 282 285 #endif 283 286 QSize mLastSizeHint; 287 QRect mDesktopGeometry; 284 288 }; 285 289 -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp
r7455 r7463 749 749 setFocusPolicy (Qt::WheelFocus); 750 750 751 /* Remember the desktop geometry and register for geometry change 752 events for telling the guest about video modes we like. */ 753 mDesktopGeometry = QApplication::desktop()->screenGeometry (this); 754 connect (QApplication::desktop(), SIGNAL(workAreaResized(int)), 755 this, SLOT(doResizeDesktop(int))); 756 751 757 #if defined (VBOX_GUI_DEBUG) && defined (VBOX_GUI_FRAMEBUF_STAT) 752 758 VMCPUTimer::calibrate (200); … … 2242 2248 } 2243 2249 mToggleFSModeTimer->start (2000); 2250 } 2251 2252 /** 2253 * Get the current desktop geometry for the console view widget 2254 * 2255 * @returns the geometry 2256 */ 2257 QRect VBoxConsoleView::getDesktopGeometry() 2258 { 2259 return mDesktopGeometry; 2244 2260 } 2245 2261 … … 3580 3596 } 3581 3597 3598 void VBoxConsoleView::doResizeDesktop (int) 3599 { 3600 mDesktopGeometry = QApplication::desktop()->screenGeometry (this); 3601 } 3582 3602 3583 3603 /** -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFrameBuffer.cpp
r7460 r7463 25 25 /* Qt includes */ 26 26 #include <QPainter> 27 #include <qdesktopwidget.h>28 27 29 28 // … … 199 198 return E_POINTER; 200 199 *aSupported = TRUE; 201 QRect screen = QApplication::desktop()->screenGeometry (mView);200 QRect screen = mView->getDesktopGeometry(); 202 201 if (aWidth > (ULONG) screen.width()) 203 202 *aSupported = FALSE;
Note:
See TracChangeset
for help on using the changeset viewer.