diff options
Diffstat (limited to 'libavdevice')
-rw-r--r-- | libavdevice/x11grab.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c index 91c62d93e7..4dddceb5aa 100644 --- a/libavdevice/x11grab.c +++ b/libavdevice/x11grab.c @@ -43,6 +43,7 @@ #include "libavutil/parseutils.h" #include "libavutil/time.h" #include <time.h> +#include <X11/cursorfont.h> #include <X11/X.h> #include <X11/Xlib.h> #include <X11/Xlibint.h> @@ -357,6 +358,12 @@ paint_mouse_pointer(XImage *image, struct x11grab *s) if (image->bits_per_pixel != 24 && image->bits_per_pixel != 32) return; + Cursor c = XCreateFontCursor(dpy, XC_left_ptr); + Window w = DefaultRootWindow(dpy); + XSetWindowAttributes attr; + attr.cursor = c; + XChangeWindowAttributes(dpy, w, CWCursor, &attr); + xcim = XFixesGetCursorImage(dpy); x = xcim->x - xcim->xhot; |