(-dealloc): Only free rcontext when using our own wraster.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@17417 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
alexm 2003-08-02 11:35:47 +00:00
parent d2d01412e0
commit 18169e3752
2 changed files with 15 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2003-08-02 13:29 Alexander Malmberg <alexander@malmberg.org>
* Source/x11/XGServer.m (-dealloc): Only use the rcontext freeing
hack when using our own wraster.
2003-08-01 Adam Fedor <fedor@gnu.org>
* configure.ac: Move freetype check before Xft check and

View file

@ -256,8 +256,17 @@ _parse_display_name(NSString *name, int *dn, int *sn)
- (void) dealloc
{
#ifndef HAVE_WRASTER_H
// FIXME: context.c does not include a clean up function for Rcontext,
// so we try do it here.
/*
Note that this can be done only when we use our own version of wraster.
If we're using an external version of wraster, the rcontext structure
might be different (different fields, or differently used fields), which
breaks this code.
*/
if (rcontext)
{
XFreeGC(rcontext->dpy, rcontext->copy_gc);
@ -280,6 +289,7 @@ _parse_display_name(NSString *name, int *dn, int *sn)
free(rcontext->attribs);
free(rcontext);
}
#endif
[super dealloc];
}