You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
x11: Fix x11grab BadCursor
Fixes Ticket1738 Based-on: A fix found in a perl module (http://ffmpeg.org/pipermail/ffmpeg-user/2012-August/008804.html) Reviewed-by: Clemens Fruhwirth <clemens@endorphin.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
e2820d99f2
commit
469a65b150
@@ -43,6 +43,7 @@
|
|||||||
#include "libavutil/parseutils.h"
|
#include "libavutil/parseutils.h"
|
||||||
#include "libavutil/time.h"
|
#include "libavutil/time.h"
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <X11/cursorfont.h>
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xlibint.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)
|
if (image->bits_per_pixel != 24 && image->bits_per_pixel != 32)
|
||||||
return;
|
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);
|
xcim = XFixesGetCursorImage(dpy);
|
||||||
|
|
||||||
x = xcim->x - xcim->xhot;
|
x = xcim->x - xcim->xhot;
|
||||||
|
Reference in New Issue
Block a user