Commit 11d695d1 authored by Michael Niedermayer's avatar Michael Niedermayer

x11grab: fix mixed declaration and code

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 977cb54f
...@@ -353,14 +353,16 @@ paint_mouse_pointer(XImage *image, struct x11grab *s) ...@@ -353,14 +353,16 @@ paint_mouse_pointer(XImage *image, struct x11grab *s)
* Anyone who performs further investigation of the xlib API likely risks * Anyone who performs further investigation of the xlib API likely risks
* permanent brain damage. */ * permanent brain damage. */
uint8_t *pix = image->data; uint8_t *pix = image->data;
Cursor c;
Window w;
XSetWindowAttributes attr;
/* Code doesn't currently support 16-bit or PAL8 */ /* Code doesn't currently support 16-bit or PAL8 */
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); c = XCreateFontCursor(dpy, XC_left_ptr);
Window w = DefaultRootWindow(dpy); w = DefaultRootWindow(dpy);
XSetWindowAttributes attr;
attr.cursor = c; attr.cursor = c;
XChangeWindowAttributes(dpy, w, CWCursor, &attr); XChangeWindowAttributes(dpy, w, CWCursor, &attr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment