VirtualBox

Changeset 516 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 1, 2007 5:41:09 PM (18 years ago)
Author:
vboxsync
Message:

perform guest resize operations only once when the mouse button was released

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r503 r516  
    722722    bool fWin32UI = false;
    723723#endif
    724     bool fShowSDLConfig = false;
    725     uint32_t fixedWidth = ~(uint32_t)0;
    726     uint32_t fixedHeight = ~(uint32_t)0;
    727     uint32_t fixedBPP = ~(uint32_t)0;
     724    bool fShowSDLConfig    = false;
     725    uint32_t fixedWidth    = ~(uint32_t)0;
     726    uint32_t fixedHeight   = ~(uint32_t)0;
     727    uint32_t fixedBPP      = ~(uint32_t)0;
     728    uint32_t uResizeWidth  = ~(uint32_t)0;
     729    uint32_t uResizeHeight = ~(uint32_t)0;
    728730
    729731    /* The damned GOTOs forces this to be up here - totally out of place. */
     
    22422244            case SDL_ACTIVEEVENT:
    22432245            {
     2246                /**
     2247                 * @todo This is a workaround for synchronization problems between EMT and the
     2248                 *       SDL main thread. It can happen that the SDL thread already starts a
     2249                 *       new resize operation while the EMT is still busy with the old one
     2250                 *       leading to a deadlock. Therefore we call SetVideoModeHint only once
     2251                 *       when the mouse button was released.
     2252                 */
     2253                if (uResizeWidth != ~(uint32_t)0)
     2254                {
     2255                    /* communicate the resize event to the guest */
     2256                    gDisplay->SetVideoModeHint(uResizeWidth, uResizeHeight, 0);
     2257                    uResizeWidth = ~(uint32_t)0;
     2258                }
     2259
    22442260                /*
    22452261                 * There is a strange behaviour in SDL when running without a window
     
    22662282                {
    22672283#ifdef VBOX_SECURELABEL
    2268                     /* communicate the resize event to the guest */
    2269                     gDisplay->SetVideoModeHint(event.resize.w, RT_MAX(0, event.resize.h - SECURE_LABEL_HEIGHT), 0);
     2284                    uResizeWidth  = event.resize.w;
     2285                    uResizeHeight = RT_MAX(0, event.resize.h - SECURE_LABEL_HEIGHT);
    22702286#else
    2271                     /* communicate the resize event to the guest */
    2272                     gDisplay->SetVideoModeHint(event.resize.w, event.resize.h, 0);
     2287                    uResizeHeight = event.resize.h;
    22732288#endif
    22742289                }
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