VirtualBox

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


Ignore:
Timestamp:
Nov 26, 2015 1:44:12 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: Qt5 migration (part 21): QCursor API changes: No more support for old Xcursor fancy thing, X11 will use cross-platform approach as Mac OS X do.

File:
1 edited

Legend:

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

    r58685 r58881  
    7676# include <X11/Xlib.h>
    7777# include <X11/Xutil.h>
    78 # ifndef VBOX_WITHOUT_XCURSOR
    79 #  include <X11/Xcursor/Xcursor.h>
    80 # endif /* VBOX_WITHOUT_XCURSOR */
    8178#endif /* Q_WS_X11 */
    8279
     
    16821679        DeleteObject(hBitmap);
    16831680
    1684 #elif defined (Q_WS_X11) && !defined (VBOX_WITHOUT_XCURSOR)
    1685 
    1686     XcursorImage *img = XcursorImageCreate(uWidth, uHeight);
    1687     Assert(img);
    1688     if (img)
    1689     {
    1690         img->xhot = uXHot;
    1691         img->yhot = uYHot;
    1692 
    1693         XcursorPixel *dstShapePtr = img->pixels;
    1694 
    1695         if (fHasAlpha)
    1696         {
    1697             memcpy(dstShapePtr, srcShapePtr, uHeight * srcShapePtrScan);
    1698         }
    1699         else
    1700         {
    1701             renderCursorPixels((uint32_t *)srcShapePtr, srcAndMaskPtr,
    1702                                uWidth, uHeight,
    1703                                dstShapePtr, uHeight * srcShapePtrScan);
    1704         }
    1705 
    1706         /* Set the new cursor: */
    1707         m_cursor = QCursor(XcursorImageLoadCursor(QX11Info::display(), img));
    1708         m_fIsValidPointerShapePresent = true;
    1709 
    1710         XcursorImageDestroy(img);
    1711     }
    1712 
    1713 #elif defined(Q_WS_MAC)
    1714 
    1715     /* Create a ARGB image out of the shape data. */
    1716     QImage image  (uWidth, uHeight, QImage::Format_ARGB32);
     1681#elif defined(Q_WS_X11) || defined(Q_WS_MAC)
     1682
     1683    /* Create a ARGB image out of the shape data: */
     1684    QImage image(uWidth, uHeight, QImage::Format_ARGB32);
    17171685
    17181686    if (fHasAlpha)
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