Removed unneeded method [xrContext]. Moved context access into

[createDPSContext] and call [XGServer xrContextForScreen:] instead
of [XGServer xrContext].


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@15589 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2003-01-14 01:00:54 +00:00
parent dc3b209d1b
commit f2acf0e656

View file

@ -206,18 +206,6 @@ GNUstepErrorProc (DPSContext ctxt, DPSErrorCode errCode,
text_proc = GNUstepTextProc;
}
context = [self xrContext];
if (is_screen_context && !XDPSExtensionPresent(XDPY))
{
#if HAVE_DPS_DPSNXARGS_H
/* Make it possible for this client to start a DPS NX agent */
XDPSNXSetClientArg(XDPSNX_AUTO_LAUNCH, (void *)True);
#else
NSLog (@"DPS extension not in server!");
exit (1);
#endif
}
/*
* Create the context
*/
@ -436,14 +424,6 @@ GNUstepErrorProc (DPSContext ctxt, DPSErrorCode errCode,
return NULL;
}
- (void *) xrContext
{
if (is_screen_context)
return [(XGServer *)server xrContext];
else
return NULL;
}
- (DPSContext)xDPSContext
{
return dps_context;
@ -455,6 +435,19 @@ GNUstepErrorProc (DPSContext ctxt, DPSErrorCode errCode,
unsigned long valuemask;
XGCValues values;
// Where should the screen number come from?
context = [(XGServer *)server xrContextForScreen: 0];
if (!XDPSExtensionPresent(XDPY))
{
#if HAVE_DPS_DPSNXARGS_H
/* Make it possible for this client to start a DPS NX agent */
XDPSNXSetClientArg(XDPSNX_AUTO_LAUNCH, (void *)True);
#else
NSLog (@"DPS extension not in server!");
exit (1);
#endif
}
/* Create a GC for the initial window */
values.foreground = ((RContext *)context)->black;
values.background = ((RContext *)context)->white;