• Antonio Ospite's avatar
    avdevice/x11grab: fix cursor drawing in multi-screen setup · 69c34a6a
    Antonio Ospite authored
    The code uses XFixes to retrieve the cursor coordinates, but XFixes
    gives no information of what screen the pointer is on; this results in
    always drawing the cursor on the captured screen even if the mouse
    pointer was on another screen.
    
    For example, when capturing from screen 1 (i.e. -f x11grab -i ":0.1")
    the cursor was being drawn in the captured image even when the mouse
    pointer was actually on screen 0, which is wrong and visually confusing.
    
    Use XQueryPointer to check that the pointer is actually on the screen
    which is being captured.
    Signed-off-by: 's avatarAntonio Ospite <ao2@ao2.it>
    Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
    69c34a6a
x11grab.c 22.3 KB