VirtualBox

Changeset 7463 in vbox


Ignore:
Timestamp:
Mar 14, 2008 5:03:06 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
28902
Message:

Frontends/VirtualBox: support VideoModeSupported guest request, this time using the right threads

Location:
trunk/src/VBox/Frontends
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleView.h

    r7335 r7463  
    9898    void setIgnoreMainwndResize (bool aYes) { mIgnoreMainwndResize = aYes; }
    9999
     100    QRect getDesktopGeometry();
     101
    100102signals:
    101103
     
    190192
    191193    void doResizeHint (const QSize &aSize = QSize());
     194    void doResizeDesktop (int);
    192195
    193196private:
     
    286289#endif
    287290    QSize mLastSizeHint;
     291    QRect mDesktopGeometry;
    288292};
    289293
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp

    r7450 r7463  
    753753    setFocusPolicy (WheelFocus);
    754754
     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
    755761#if defined (VBOX_GUI_DEBUG) && defined (VBOX_GUI_FRAMEBUF_STAT)
    756762    VMCPUTimer::calibrate (200);
     
    22522258    }
    22532259    mToggleFSModeTimer->start (2000, true);
     2260}
     2261
     2262/**
     2263 * Get the current desktop geometry for the console view widget
     2264 *
     2265 * @returns the geometry
     2266 */
     2267QRect VBoxConsoleView::getDesktopGeometry()
     2268{
     2269    return mDesktopGeometry;
    22542270}
    22552271
     
    35863602}
    35873603
     3604void VBoxConsoleView::doResizeDesktop (int)
     3605{
     3606    mDesktopGeometry = QApplication::desktop()->screenGeometry (this);
     3607}
    35883608
    35893609/**
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxFrameBuffer.cpp

    r7460 r7463  
    197197        return E_POINTER;
    198198    *aSupported = TRUE;
    199     QRect screen = QApplication::desktop()->screenGeometry (mView);
     199    QRect screen = mView->getDesktopGeometry();
    200200    /* Leave 200 pixels leeway. */
    201201    if (aWidth > (ULONG) screen.width() - 200)
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleView.h

    r7435 r7463  
    9494    void setIgnoreMainwndResize (bool aYes) { mIgnoreMainwndResize = aYes; }
    9595
     96    QRect getDesktopGeometry();
     97
    9698signals:
    9799
     
    186188
    187189    void doResizeHint (const QSize &aSize = QSize());
     190    void doResizeDesktop (int);
    188191
    189192private:
     
    282285#endif
    283286    QSize mLastSizeHint;
     287    QRect mDesktopGeometry;
    284288};
    285289
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp

    r7455 r7463  
    749749    setFocusPolicy (Qt::WheelFocus);
    750750
     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
    751757#if defined (VBOX_GUI_DEBUG) && defined (VBOX_GUI_FRAMEBUF_STAT)
    752758    VMCPUTimer::calibrate (200);
     
    22422248    }
    22432249    mToggleFSModeTimer->start (2000);
     2250}
     2251
     2252/**
     2253 * Get the current desktop geometry for the console view widget
     2254 *
     2255 * @returns the geometry
     2256 */
     2257QRect VBoxConsoleView::getDesktopGeometry()
     2258{
     2259    return mDesktopGeometry;
    22442260}
    22452261
     
    35803596}
    35813597
     3598void VBoxConsoleView::doResizeDesktop (int)
     3599{
     3600    mDesktopGeometry = QApplication::desktop()->screenGeometry (this);
     3601}
    35823602 
    35833603/**
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFrameBuffer.cpp

    r7460 r7463  
    2525/* Qt includes */
    2626#include <QPainter>
    27 #include <qdesktopwidget.h>
    2827
    2928//
     
    199198        return E_POINTER;
    200199    *aSupported = TRUE;
    201     QRect screen = QApplication::desktop()->screenGeometry (mView);
     200    QRect screen = mView->getDesktopGeometry();
    202201    if (aWidth > (ULONG) screen.width())
    203202        *aSupported = FALSE;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette