• Keith Packard's avatar
    xfree86: Set xf86CrtcConfigRec cursor pointer to NULL in HideCursor · f5670b4a
    Keith Packard authored
    This makes the cursor pointer held by xf86Cursors.c get reset to NULL
    whenever the cursor isn't displayed, and means that the reference
    count held in xf86Cursor.c is sufficient to cover the reference in
    xf86Cursors.c.
    
    As HideCursor may be called in the cursor loading path after
    UseHWCursor or UseHWCursorARGB when HARDWARE_CURSOR_UPDATE_UNHIDDEN
    isn't set in the Flags field, the setting of the cursor pointer had to
    be moved to the LoadCursor paths.
    
    LoadCursorARGBCheck gets the cursor pointer, but LoadCursorImageCheck
    does not. For LoadCursorImageCheck, I added a new function,
    xf86CurrentCursor, which returns the current cursor. With this new
    function, we can eliminate the cursor pointer from the
    xf86CrtcConfigRec, once drivers are converted over to use it.
    Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
    Acked-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
    f5670b4a
xf86Cursor.h 3.01 KB