* Headers/x11/XWindowBuffer.h: Bracket even more usage of shm in

conditional compilation.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34034 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2011-10-20 08:34:49 +00:00
parent 97f4f7def9
commit 8d50a6cef9
2 changed files with 15 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2011-10-20 Fred Kiefer <FredKiefer@gmx.de>
* Headers/x11/XWindowBuffer.h: Bracket even more usage of shm in
conditional compilation.
2011-10-18 Fred Kiefer <FredKiefer@gmx.de>
* Headers/x11/XWindowBuffer.h: Protect the usage of shm.

View file

@ -250,6 +250,7 @@ no_xshm:
wi->window->xframe.size.width, wi->window->xframe.size.height);*/
if (wi->ximage)
{
#ifdef XSHM
if (wi->use_shm)
{
XShmDetach(wi->display, &wi->shminfo);
@ -257,6 +258,7 @@ no_xshm:
shmdt(wi->shminfo.shmaddr);
}
else
#endif
XDestroyImage(wi->ximage);
}
if (wi->pixmap)
@ -425,6 +427,7 @@ extern int XShmGetEventBase(Display *d);
- (void) _gotShmCompletion
{
#ifdef XSHM
if (!use_shm)
return;
@ -458,6 +461,7 @@ extern int XShmGetEventBase(Display *d);
}
}
// XFlush(window->display);
#endif
}
- (void) _exposeRect: (NSRect)rect
@ -505,9 +509,9 @@ accuracy, we do the test using int: s.
if (w <= 0 || h <= 0)
return;
#ifdef XSHM
if (use_shm)
{
#ifdef HAVE_XSHAPE
/* HACK: lets try to use shaped windows to get some use out of
destination alpha */
@ -645,7 +649,9 @@ static int warn = 0;
}
}
}
else if (ximage)
else
#endif
if (ximage)
{
XPutImage(display, drawable, gc, ximage, x, y, x, y, w, h);
}
@ -708,6 +714,7 @@ static int warn = 0;
pixmap=0;
}
#ifdef XSHM
if (use_shm)
{
XShmDetach(display, &shminfo);
@ -715,6 +722,7 @@ static int warn = 0;
shmdt(shminfo.shmaddr);
}
else
#endif
XDestroyImage(ximage);
}
if (alpha)