VirtualBox

Ignore:
Timestamp:
May 22, 2012 4:41:38 PM (13 years ago)
Author:
vboxsync
Message:

crOpenGL: VM window scroll handling

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r41107 r41404  
    791791}
    792792
     793void UIMachineView::scrollContentsBy(int dx, int dy)
     794{
    793795#ifdef VBOX_WITH_VIDEOHWACCEL
    794 void UIMachineView::scrollContentsBy(int dx, int dy)
    795 {
    796796    if (m_pFrameBuffer)
    797797    {
    798798        m_pFrameBuffer->viewportScrolled(dx, dy);
    799799    }
     800#endif /* VBOX_WITH_VIDEOHWACCEL */
    800801    QAbstractScrollArea::scrollContentsBy(dx, dy);
    801 }
    802 #endif /* VBOX_WITH_VIDEOHWACCEL */
     802
     803    session().GetConsole().GetDisplay().ViewportChanged(screenId(),
     804                            contentsX(),
     805                            contentsY(),
     806                            contentsWidth(),
     807                            contentsHeight());
     808}
     809
    803810
    804811#ifdef Q_WS_MAC
     
    10031010bool UIMachineView::eventFilter(QObject *pWatched, QEvent *pEvent)
    10041011{
    1005 #ifdef VBOX_WITH_VIDEOHWACCEL
    10061012    if (pWatched == viewport())
    10071013    {
     
    10101016            case QEvent::Resize:
    10111017            {
     1018                QResizeEvent* pResizeEvent = static_cast<QResizeEvent*>(pEvent);
     1019#ifdef VBOX_WITH_VIDEOHWACCEL
    10121020                if (m_pFrameBuffer)
    1013                     m_pFrameBuffer->viewportResized(static_cast<QResizeEvent*>(pEvent));
     1021                    m_pFrameBuffer->viewportResized(pResizeEvent);
     1022#endif /* VBOX_WITH_VIDEOHWACCEL */
     1023                session().GetConsole().GetDisplay().ViewportChanged(screenId(),
     1024                        contentsX(),
     1025                        contentsY(),
     1026                        contentsWidth(),
     1027                        contentsHeight());
    10141028                break;
    10151029            }
     
    10181032        }
    10191033    }
    1020 #endif /* VBOX_WITH_VIDEOHWACCEL */
    10211034    if (pWatched == machineWindow())
    10221035    {
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r41107 r41404  
    165165    void scrollBy(int dx, int dy);
    166166    static void dimImage(QImage &img);
    167 #ifdef VBOX_WITH_VIDEOHWACCEL
    168167    void scrollContentsBy(int dx, int dy);
    169 #endif /* VBOX_WITH_VIDEOHWACCEL */
    170168#ifdef Q_WS_MAC
    171169    void updateDockIcon();
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