VirtualBox

Ignore:
Timestamp:
Jul 3, 2019 2:35:37 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
131746
Message:

x11/VBoxClient: Heed RT_NEED_NEW_AND_DELETE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/draganddrop.cpp

    r76553 r79482  
    113113        XEvent x11;
    114114    };
     115#ifdef IN_GUEST
     116    RTMEM_IMPLEMENT_NEW_AND_DELETE();
     117#endif
    115118};
    116119
     
    275278
    276279private:
    277 
     280#ifdef RT_NEED_NEW_AND_DELETE
     281    RTMEM_IMPLEMENT_NEW_AND_DELETE();
     282#endif
    278283    xHelpers(Display *pDisplay)
    279284      : m_pDisplay(pDisplay)
     
    430435
    431436public:
    432 
     437#ifdef RT_NEED_NEW_AND_DELETE
     438    RTMEM_IMPLEMENT_NEW_AND_DELETE();
     439#endif
    433440    VBoxDnDProxyWnd(void);
    434 
    435441    virtual ~VBoxDnDProxyWnd(void);
    436442
     
    453459};
    454460
     461/** This class only serve to avoid dragging in generic new() and delete(). */
     462class WrappedXEvent
     463{
     464public:
     465    XEvent m_Event;
     466
     467public:
     468#ifdef RT_NEED_NEW_AND_DELETE
     469    RTMEM_IMPLEMENT_NEW_AND_DELETE();
     470#endif
     471    WrappedXEvent(const XEvent &a_rSrcEvent)
     472    {
     473        m_Event = a_rSrcEvent;
     474    }
     475
     476    WrappedXEvent()
     477    {
     478        RT_ZERO(m_Event);
     479    }
     480
     481    WrappedXEvent &operator=(const XEvent &a_rSrcEvent)
     482    {
     483        m_Event = a_rSrcEvent;
     484        return *this;
     485    }
     486};
     487
    455488/**
    456489 * Class for handling a single drag and drop operation, that is,
     
    480513    };
    481514
     515#ifdef RT_NEED_NEW_AND_DELETE
     516    RTMEM_IMPLEMENT_NEW_AND_DELETE();
     517#endif
    482518    DragInstance(Display *pDisplay, DragAndDropService *pParent);
    483519
     
    579615    volatile uint32_t           m_enmState;
    580616    /** The instance's own X event queue. */
    581     RTCMTList<XEvent>           m_eventQueueList;
     617    RTCMTList<WrappedXEvent>    m_eventQueueList;
    582618    /** Critical section for providing serialized access to list
    583619     *  event queue's contents. */
     
    14841520            if (RT_SUCCESS(rc2))
    14851521            {
    1486                 XEvent e = m_eventQueueList.at(i);
     1522                XEvent e = m_eventQueueList.at(i).m_Event;
    14871523
    14881524                fFound = e.type == iType;
     
    15421578            if (RT_SUCCESS(rc2))
    15431579            {
    1544                 XEvent e = m_eventQueueList.at(i);
     1580                XEvent e = m_eventQueueList.at(i).m_Event;
    15451581                if (   e.type                 == ClientMessage
    15461582                    && e.xclient.message_type == aType)
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