VirtualBox

Changeset 55543 in vbox


Ignore:
Timestamp:
Apr 30, 2015 10:57:46 AM (9 years ago)
Author:
vboxsync
Message:

Frontends: use approvals for VBoxEventType_OnCanShowWindow, workaround for VBoxEventType_OnShowWindow.

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

Legend:

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

    r55437 r55543  
    235235                ComPtr<IShowWindowEvent> swev = aEvent;
    236236                Assert(swev);
    237                 swev->COMSETTER(WinId)(0);
     237                /* Ignore the event, WinId is either still zero or some other listener assigned it. */
     238                NOREF(swev); /* swev->COMSETTER(WinId)(0); */
    238239                break;
    239240            }
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r55401 r55543  
    529529                if (!SDL_GetWMInfo(&info))
    530530                    pCSWEv->AddVeto(NULL);
     531                else
     532                    pCSWEv->AddApproval(NULL);
    531533#endif
    532534                break;
     
    537539                ComPtr<IShowWindowEvent> pSWEv = aEvent;
    538540                Assert(pSWEv);
     541                LONG64 winId = 0;
     542                pSWEv->COMGETTER(WinId)(&winId);
     543                if (winId != 0)
     544                    break; /* WinId already set by some other listener. */
    539545#ifndef RT_OS_DARWIN
    540546                SDL_SysWMinfo info;
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp

    r55359 r55543  
    242242            if (fVeto)
    243243                es.AddVeto(strReason);
     244            else
     245                es.AddApproval(strReason);
    244246            break;
    245247        }
     
    248250            CShowWindowEvent es(pEvent);
    249251            /* Has to be done in place to give an answer: */
    250             LONG64 winId;
     252            LONG64 winId = es.GetWinId();
     253            if (winId != 0)
     254                break; /* Already set by some listener. */
    251255            emit sigShowWindow(winId);
    252256            es.SetWinId(winId);
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