mirror of
https://github.com/gnustep/libs-back.git
synced 2025-05-30 00:40:55 +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
8706bc6022
commit
9b97b70ad2
2 changed files with 15 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue