mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 11:51:27 +00:00
Add XWindowBufferUseXShm defaults variable.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@16908 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
684b8ddf3b
commit
2ebeb2d8b0
2 changed files with 15 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-06-12 19:22 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/x11/XWindowBuffer.m: Add XWindowBufferUseXShm defaults
|
||||
variable.
|
||||
|
||||
2003-06-11 15:32 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/art/ftfont.m: Implement -glyphWithName: and
|
||||
|
|
|
@ -41,6 +41,8 @@ static int num_window_buffers;
|
|||
|
||||
static int use_shape_hack = 0; /* this is an ugly hack :) */
|
||||
|
||||
static int use_xshm = 1;
|
||||
|
||||
|
||||
|
||||
@implementation XWindowBuffer
|
||||
|
@ -148,6 +150,9 @@ static int use_shape_hack = 0; /* this is an ugly hack :) */
|
|||
goto no_xshm;
|
||||
|
||||
#define WARN @" Falling back to normal XImage:s (will be slower)."
|
||||
if (!use_xshm)
|
||||
goto no_xshm;
|
||||
|
||||
/* Use XShm if possible, else fall back to normal XImage:s */
|
||||
if (!XShmQueryExtension(wi->display))
|
||||
{
|
||||
|
@ -534,8 +539,11 @@ static int warn = 0;
|
|||
|
||||
+(void) initialize
|
||||
{
|
||||
use_shape_hack = [[NSUserDefaults standardUserDefaults]
|
||||
boolForKey: @"XWindowBuffer-shape-hack"];
|
||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||
use_shape_hack = [ud boolForKey: @"XWindowBuffer-shape-hack"];
|
||||
|
||||
if ([ud objectForKey: @"XWindowBufferUseXShm"])
|
||||
use_xshm = [ud boolForKey: @"XWindowBufferUseXShm"];
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue