forked from old/legacy-imlib2
parent
08183bec3f
commit
d67ea1d096
|
@ -24,11 +24,11 @@ static int list_max_count = 0;
|
||||||
static char _x_err = 0;
|
static char _x_err = 0;
|
||||||
|
|
||||||
/* the fucntion we use for catching the error */
|
/* the fucntion we use for catching the error */
|
||||||
static void
|
static int
|
||||||
TmpXError(Display * d, XErrorEvent * ev)
|
TmpXError(Display * d, XErrorEvent * ev)
|
||||||
{
|
{
|
||||||
_x_err = 1;
|
_x_err = 1;
|
||||||
return;
|
return 0;
|
||||||
d = NULL;
|
d = NULL;
|
||||||
ev = NULL;
|
ev = NULL;
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ __imlib_ShmGetXImage(Display * d, Visual * v, Drawable draw, int depth,
|
||||||
/* setup a temporary error handler */
|
/* setup a temporary error handler */
|
||||||
_x_err = 0;
|
_x_err = 0;
|
||||||
XSync(d, False);
|
XSync(d, False);
|
||||||
ph = XSetErrorHandler((XErrorHandler) TmpXError);
|
ph = XSetErrorHandler(TmpXError);
|
||||||
}
|
}
|
||||||
/* ask X to attach to the shared mem segment */
|
/* ask X to attach to the shared mem segment */
|
||||||
XShmAttach(d, si);
|
XShmAttach(d, si);
|
||||||
|
@ -85,7 +85,7 @@ __imlib_ShmGetXImage(Display * d, Visual * v, Drawable draw, int depth,
|
||||||
/* wait for X to reply and do this */
|
/* wait for X to reply and do this */
|
||||||
XSync(d, False);
|
XSync(d, False);
|
||||||
/* reset the error handler */
|
/* reset the error handler */
|
||||||
XSetErrorHandler((XErrorHandler) ph);
|
XSetErrorHandler(ph);
|
||||||
x_does_shm = 1;
|
x_does_shm = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue