VirtualBox

Changeset 54014 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jan 28, 2015 1:50:21 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
97922
Message:

FE/Qt: Runtime UI: Notify interested listeners about viewport changes when machine-view position changed inside machine-window.

File:
1 edited

Legend:

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

    r53963 r54014  
    622622    viewport()->setMouseTracking(true);
    623623
     624    /* We have to watch for own events too: */
     625    installEventFilter(this);
     626
    624627    /* QScrollView does the below on its own, but let's
    625628     * do it anyway for the case it will not do it in the future: */
     
    11811184        }
    11821185    }
     1186
     1187    if (pWatched == this)
     1188    {
     1189        switch (pEvent->type())
     1190        {
     1191            case QEvent::Move:
     1192            {
     1193                /* In some cases viewport resize-events can provoke the
     1194                 * machine-view position changes inside the machine-window.
     1195                 * We have to notify interested listeners like 3D service. */
     1196                display().ViewportChanged(screenId(),
     1197                                          contentsX(), contentsY(),
     1198                                          visibleWidth(), visibleHeight());
     1199                break;
     1200            }
     1201            default:
     1202                break;
     1203        }
     1204    }
     1205
    11831206    if (pWatched == machineWindow())
    11841207    {
Note: See TracChangeset for help on using the changeset viewer.

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