[libav-devel] [PATCHv2] x11grab: fix drawing cursor in multi-screen setup

Luca Barbato lu_zero at gentoo.org
Fri Sep 19 13:04:54 CEST 2014

On 19/09/14 11:35, Antonio Ospite wrote:
> The paint_mouse_pointer() code uses XFixes to retrieve the cursor
> coordinates, but XFixes gives no information about 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 and if it is not, don't draw the cursor.
> Also, don't follow the mouse or redraw the region when the pointer is on
> another screen.
> Signed-off-by: Antonio Ospite <ao2 at ao2.it>
> ---
> Hey Luca, let me know if/when you manage to test this yourself, some more
> feedback is always welcome.

I have the driver installed but I hadn't had time to test it, hopefully
Tuesday I should have a little time.

> Changes since v1:
>   - rework the fix to cover the follow_mouse case
> I will submit a patch to xcbgrab as soon as time permits.
> Thanks,

Thanks a lot!


More information about the libav-devel mailing list