Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver

This commit is contained in:
Zephaniah E. Hull 2006-09-10 03:49:17 -04:00
commit 60db190ecf
11 changed files with 122 additions and 42 deletions

View File

@ -73,6 +73,9 @@ struct __GLXDRIscreen {
__DRIscreen driScreen; __DRIscreen driScreen;
void *driver; void *driver;
xf86EnterVTProc *enterVT;
xf86LeaveVTProc *leaveVT;
unsigned char glx_enable_bits[__GLX_EXT_BYTES]; unsigned char glx_enable_bits[__GLX_EXT_BYTES];
}; };
@ -622,8 +625,7 @@ static __DRIfuncPtr getProcAddress(const char *proc_name)
static __DRIscreen *findScreen(__DRInativeDisplay *dpy, int scrn) static __DRIscreen *findScreen(__DRInativeDisplay *dpy, int scrn)
{ {
__GLXDRIscreen *screen = __GLXDRIscreen *screen = (__GLXDRIscreen *) __glXgetActiveScreen(scrn);
(__GLXDRIscreen *) __glXgetActiveScreen(scrn);
return &screen->driScreen; return &screen->driScreen;
} }
@ -817,6 +819,30 @@ static const __DRIinterfaceMethods interface_methods = {
static const char dri_driver_path[] = DRI_DRIVER_PATH; static const char dri_driver_path[] = DRI_DRIVER_PATH;
static Bool
glxDRIEnterVT (int index, int flags)
{
__GLXDRIscreen *screen = (__GLXDRIscreen *) __glXgetActiveScreen(index);
LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n");
glxResumeClients();
return (*screen->enterVT) (index, flags);
}
static void
glxDRILeaveVT (int index, int flags)
{
__GLXDRIscreen *screen = (__GLXDRIscreen *) __glXgetActiveScreen(index);
LogMessage(X_INFO, "AIGLX: Suspending AIGLX clients for VT switch\n");
glxSuspendClients();
return (*screen->leaveVT) (index, flags);
}
static __GLXscreen * static __GLXscreen *
__glXDRIscreenProbe(ScreenPtr pScreen) __glXDRIscreenProbe(ScreenPtr pScreen)
{ {
@ -842,6 +868,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
char filename[128]; char filename[128];
Bool isCapable; Bool isCapable;
size_t buffer_size; size_t buffer_size;
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable")) { if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable")) {
LogMessage(X_ERROR, "AIGLX: DRI module not loaded\n"); LogMessage(X_ERROR, "AIGLX: DRI module not loaded\n");
@ -1029,6 +1056,11 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
__glXsetEnterLeaveServerFuncs(__glXDRIenterServer, __glXDRIleaveServer); __glXsetEnterLeaveServerFuncs(__glXDRIenterServer, __glXDRIleaveServer);
screen->enterVT = pScrn->EnterVT;
pScrn->EnterVT = glxDRIEnterVT;
screen->leaveVT = pScrn->LeaveVT;
pScrn->LeaveVT = glxDRILeaveVT;
LogMessage(X_INFO, LogMessage(X_INFO,
"AIGLX: Loaded and initialized %s\n", filename); "AIGLX: Loaded and initialized %s\n", filename);

View File

@ -59,10 +59,7 @@ xGLXSingleReply __glXReply;
** A set of state for each client. The 0th one is unused because client ** A set of state for each client. The 0th one is unused because client
** indices start at 1, not 0. ** indices start at 1, not 0.
*/ */
__GLXclientState *__glXClients[MAXCLIENTS+1]; static __GLXclientState *__glXClients[MAXCLIENTS + 1];
static Bool inDispatch;
/* /*
** Forward declarations. ** Forward declarations.
@ -219,6 +216,10 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
return True; return True;
} }
static __GLXcontext *glxPendingDestroyContexts;
static int glxServerLeaveCount;
static int glxBlockClients;
/* /*
** Free a context. ** Free a context.
*/ */
@ -236,13 +237,14 @@ GLboolean __glXFreeContext(__GLXcontext *cx)
* __glXDispatch() or as a callback from the resource manager. In * __glXDispatch() or as a callback from the resource manager. In
* the latter case we need to lift the DRI lock manually. */ * the latter case we need to lift the DRI lock manually. */
if (!inDispatch) if (glxBlockClients) {
__glXleaveServer(); __glXleaveServer();
cx->destroy(cx);
cx->destroy(cx); __glXenterServer();
} else {
if (!inDispatch) cx->next = glxPendingDestroyContexts;
__glXenterServer(); glxPendingDestroyContexts = cx;
}
return GL_TRUE; return GL_TRUE;
} }
@ -338,7 +340,7 @@ void GlxExtensionInit(void)
/* /*
** Initialize table of client state. There is never a client 0. ** Initialize table of client state. There is never a client 0.
*/ */
for (i=1; i <= MAXCLIENTS; i++) { for (i = 1; i <= MAXCLIENTS; i++) {
__glXClients[i] = 0; __glXClients[i] = 0;
} }
@ -409,11 +411,43 @@ __GLXcontext *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag,
/************************************************************************/ /************************************************************************/
/* void glxSuspendClients(void)
** Top level dispatcher; all commands are executed from here down. {
*/ int i;
/* I cried when I wrote this. Damn you XAA! */ for (i = 1; i <= MAXCLIENTS; i++) {
if (__glXClients[i] == NULL || !__glXClients[i]->inUse)
continue;
IgnoreClient(__glXClients[i]->client);
}
glxBlockClients = TRUE;
}
void glxResumeClients(void)
{
__GLXcontext *cx, *next;
int i;
glxBlockClients = FALSE;
for (i = 1; i <= MAXCLIENTS; i++) {
if (__glXClients[i] == NULL || !__glXClients[i]->inUse)
continue;
AttendClient(__glXClients[i]->client);
}
__glXleaveServer();
for (cx = glxPendingDestroyContexts; cx != NULL; cx = next) {
next = cx->next;
cx->destroy(cx);
}
glxPendingDestroyContexts = NULL;
__glXenterServer();
}
static void static void
__glXnopEnterServer(void) __glXnopEnterServer(void)
@ -438,14 +472,19 @@ void __glXsetEnterLeaveServerFuncs(void (*enter)(void),
void __glXenterServer(void) void __glXenterServer(void)
{ {
(*__glXenterServerFunc)(); glxServerLeaveCount--;
if (glxServerLeaveCount == 0)
(*__glXenterServerFunc)();
} }
void __glXleaveServer(void) void __glXleaveServer(void)
{ {
(*__glXleaveServerFunc)(); if (glxServerLeaveCount == 0)
} (*__glXleaveServerFunc)();
glxServerLeaveCount++;
}
/* /*
** Top level dispatcher; all commands are executed from here down. ** Top level dispatcher; all commands are executed from here down.
@ -491,6 +530,15 @@ static int __glXDispatch(ClientPtr client)
return __glXError(GLXBadLargeRequest); return __glXError(GLXBadLargeRequest);
} }
/* If we're currently blocking GLX clients, just put this guy to
* sleep, reset the request and return. */
if (glxBlockClients) {
ResetCurrentRequest(client);
client->sequence--;
IgnoreClient(client);
return(client->noClientException);
}
/* /*
** Use the opcode to index into the procedure table. ** Use the opcode to index into the procedure table.
*/ */
@ -500,12 +548,8 @@ static int __glXDispatch(ClientPtr client)
if (proc != NULL) { if (proc != NULL) {
__glXleaveServer(); __glXleaveServer();
inDispatch = True;
retval = (*proc)(cl, (GLbyte *) stuff); retval = (*proc)(cl, (GLbyte *) stuff);
inDispatch = False;
__glXenterServer(); __glXenterServer();
} }
else { else {

View File

@ -136,6 +136,9 @@ void __glXsetEnterLeaveServerFuncs(void (*enter)(void),
void __glXenterServer(void); void __glXenterServer(void);
void __glXleaveServer(void); void __glXleaveServer(void);
void glxSuspendClients(void);
void glxResumeClients(void);
/* /*
** State kept per client. ** State kept per client.
*/ */
@ -176,8 +179,6 @@ struct __GLXclientStateRec {
char *GLClientextensions; char *GLClientextensions;
}; };
extern __GLXclientState *__glXClients[];
/************************************************************************/ /************************************************************************/
/* /*

View File

@ -1,3 +1,4 @@
xpcdir = @xpconfigdir@/C/print/models/PS2PDFspooldir-GS xpcdir = @xpconfigdir@/C/print/models/PS2PDFspooldir-GS
dist_xpc_DATA = model-config ps2pdf_spooltodir.sh dist_xpc_DATA = model-config
dist_xpc_SCRIPTS = ps2pdf_spooltodir.sh

View File

@ -1,3 +1,4 @@
xpcdir = @xpconfigdir@/C/print/models/PSspooldir xpcdir = @xpconfigdir@/C/print/models/PSspooldir
dist_xpc_DATA = model-config spooltodir.sh dist_xpc_DATA = model-config
dist_xpc_SCRIPTS = spooltodir.sh

View File

@ -709,4 +709,4 @@ install-data-local: remove-links
uninstall-hook: remove-links uninstall-hook: remove-links
EXTRA_DIST = README dist_xpconfig_DATA = README

View File

@ -4,7 +4,7 @@
applications to use devices like printers, FAX or create applications to use devices like printers, FAX or create
documents in formats like PostScript, PCL or PDF. It may be used by documents in formats like PostScript, PCL or PDF. It may be used by
clients such as <span class="application">mozilla</span>. clients such as <span class="application">mozilla</span>.
</p><p>Xprint is a very flexible, extensible, scaleable, client/server </p><p>Xprint is a very flexible, extensible, scalable, client/server
print system based on ISO 10175 (and some other specs) and the X11 print system based on ISO 10175 (and some other specs) and the X11
rendering protocol. rendering protocol.
Using Xprint an application can search, query and use devices like Using Xprint an application can search, query and use devices like
@ -44,11 +44,11 @@
font databases.</p></dd><dt><span class="term"><tt class="option">-pn</tt></span></dt><dd><p>permits the server to continue running if it fails to font databases.</p></dd><dt><span class="term"><tt class="option">-pn</tt></span></dt><dd><p>permits the server to continue running if it fails to
establish all of its well-known sockets (connection establish all of its well-known sockets (connection
points for clients), but establishes at least points for clients), but establishes at least
one.</p></dd><dt><span class="term"><tt class="option">-XpFile <i class="replaceable"><tt>file</tt></i></tt></span></dt><dd><p>Sets an altername Xprinters file (see section FILES).</p></dd><dt><span class="term"><tt class="option">-XpSpoolerType <i class="replaceable"><tt>spoolername</tt></i></tt></span></dt><dd xmlns:ns2=""><p> one.</p></dd><dt><span class="term"><tt class="option">-XpFile <i class="replaceable"><tt>file</tt></i></tt></span></dt><dd><p>Sets an alternate Xprinters file (see section FILES).</p></dd><dt><span class="term"><tt class="option">-XpSpoolerType <i class="replaceable"><tt>spoolername</tt></i></tt></span></dt><dd xmlns:ns2=""><p>
Defines the spooler system to be used for print job spooling. Defines the spooler system to be used for print job spooling.
Supported values in xprint.mozdev.org release 009 are: Supported values in xprint.mozdev.org release 009 are:
</p><table class="simplelist" border="0" summary="Simple list"><tr><td>aix</td></tr><tr><td>aix4</td></tr><tr><td>bsd</td></tr><tr><td>osf</td></tr><tr><td>solaris</td></tr><tr><td>sysv</td></tr><tr><td>uxp</td></tr><tr><td>cups</td></tr><tr><td>lprng</td></tr><tr><td>other</td></tr><tr><td>none</td></tr></table><p> </p><table class="simplelist" border="0" summary="Simple list"><tr><td>aix</td></tr><tr><td>aix4</td></tr><tr><td>bsd</td></tr><tr><td>osf</td></tr><tr><td>solaris</td></tr><tr><td>sysv</td></tr><tr><td>uxp</td></tr><tr><td>cups</td></tr><tr><td>lprng</td></tr><tr><td>other</td></tr><tr><td>none</td></tr></table><p>
(multiple values can be specified, seperated by ':', the first active spooler will be chosen). (multiple values can be specified, separated by ':', the first active spooler will be chosen).
The default value is platform-specific and can be obtained via The default value is platform-specific and can be obtained via
</p><pre class="programlisting">Xprt -h</pre><p>. </p><pre class="programlisting">Xprt -h</pre><p>.
</p></dd></dl></div></div><div xmlns:ns3="" class="refsect1" lang="en"><a name="id2805336"></a><h2>ENVIRONMENT</h2><p> </p></dd></dl></div></div><div xmlns:ns3="" class="refsect1" lang="en"><a name="id2805336"></a><h2>ENVIRONMENT</h2><p>

View File

@ -20,7 +20,7 @@ applications to use devices like printers, FAX or create
documents in formats like PostScript, PCL or PDF. It may be used by documents in formats like PostScript, PCL or PDF. It may be used by
clients such as mozilla. clients such as mozilla.
.PP .PP
Xprint is a very flexible, extensible, scaleable, client/server Xprint is a very flexible, extensible, scalable, client/server
print system based on ISO 10175 (and some other specs) and the X11 print system based on ISO 10175 (and some other specs) and the X11
rendering protocol. rendering protocol.
Using Xprint an application can search, query and use devices like Using Xprint an application can search, query and use devices like
@ -85,7 +85,7 @@ points for clients), but establishes at least
one. one.
.TP .TP
\fB\-XpFile \fIfile\fB\fR \fB\-XpFile \fIfile\fB\fR
Sets an altername Xprinters file (see section FILES). Sets an alternate Xprinters file (see section FILES).
.TP .TP
\fB\-XpSpoolerType \fIspoolername\fB\fR \fB\-XpSpoolerType \fIspoolername\fB\fR
Defines the spooler system to be used for print job spooling. Defines the spooler system to be used for print job spooling.
@ -113,7 +113,7 @@ other
none none
(multiple values can be specified, seperated by ':', the first active spooler will be chosen). (multiple values can be specified, separated by ':', the first active spooler will be chosen).
The default value is platform-specific and can be obtained via The default value is platform-specific and can be obtained via
.nf .nf

View File

@ -55,7 +55,7 @@ HTML generation can be done like this:
clients such as <application>mozilla</application>. clients such as <application>mozilla</application>.
</para> </para>
<para>Xprint is a very flexible, extensible, scaleable, client/server <para>Xprint is a very flexible, extensible, scalable, client/server
print system based on ISO 10175 (and some other specs) and the X11 print system based on ISO 10175 (and some other specs) and the X11
rendering protocol. rendering protocol.
Using Xprint an application can search, query and use devices like Using Xprint an application can search, query and use devices like
@ -155,7 +155,7 @@ HTML generation can be done like this:
<term><option>-XpFile <replaceable>file</replaceable></option> <term><option>-XpFile <replaceable>file</replaceable></option>
</term> </term>
<listitem> <listitem>
<para>Sets an altername Xprinters file (see section FILES).</para> <para>Sets an alternate Xprinters file (see section FILES).</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -178,7 +178,7 @@ HTML generation can be done like this:
<member>other</member> <member>other</member>
<member>none</member> <member>none</member>
</simplelist> </simplelist>
(multiple values can be specified, seperated by ':', the first active spooler will be chosen). (multiple values can be specified, separated by ':', the first active spooler will be chosen).
The default value is platform-specific and can be obtained via The default value is platform-specific and can be obtained via
<programlisting>Xprt -h</programlisting>. <programlisting>Xprt -h</programlisting>.
</para> </para>

View File

@ -1 +1,2 @@
EXTRA_DIST = cde_xsessiond_xprint.sh xpcdir = /etc/X11/Xsession.d
dist_xpc_DATA = cde_xsessiond_xprint.sh

View File

@ -22,8 +22,8 @@
# Obtain list of Xprint servers # Obtain list of Xprint servers
# #
if [ -f "/etc/init.d/xprint" ] ; then if [ -x "/etc/init.d/xprint" ] ; then
XPSERVERLIST="`/bin/sh /etc/init.d/xprint get_xpserverlist`" XPSERVERLIST="`/etc/init.d/xprint get_xpserverlist`"
export XPSERVERLIST export XPSERVERLIST
fi fi