xserver: Branch 'input-hotplug' - 6 commits
Zephaniah E. Hull
warp at kemper.freedesktop.org
Sun Sep 10 22:51:32 EEST 2006
GL/glx/glxdri.c | 36 +++-
GL/glx/glxext.c | 90 +++++++---
GL/glx/glxserver.h | 5
Xi/selectev.c | 2
configure.ac | 1
dix/events.c | 1
hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile.am | 3
hw/xprint/config/C/print/models/PSspooldir/Makefile.am | 3
hw/xprint/config/Makefile.am | 2
hw/xprint/doc/Xprt.html | 6
hw/xprint/doc/Xprt.man.pre | 6
hw/xprint/doc/Xprt.sgml | 6
hw/xprint/etc/Xsession.d/Makefile.am | 3
hw/xprint/etc/Xsession.d/cde_xsessiond_xprint.sh | 4
xkb/xkbUtils.c | 2
15 files changed, 125 insertions(+), 45 deletions(-)
New commits:
diff-tree 58933757862c458e2da39bd464e50d9c0e41b313 (from 0a3740a0000191e3039fe183ae51b938d0548340)
Author: Zephaniah E. Hull <warp at agamemnon.b5>
Date: Sun Sep 10 15:50:51 2006 -0400
Warning fix, and a syntax fix in a #if 0 section of code.
diff --git a/dix/events.c b/dix/events.c
index c2c0395..34ee9fb 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -135,6 +135,7 @@ of the copyright holder.
#include <X11/extensions/XKBproto.h>
#include <X11/extensions/XKBsrv.h>
extern Bool XkbFilterEvents(ClientPtr, int, xEvent *);
+extern Bool XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies);
#endif
#ifdef XCSECURITY
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 0fde727..cbf46d8 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -242,7 +242,7 @@ XkbMapChangesPtr mc;
xkb->min_key_code= first;
/* 1/12/95 (ef) -- XXX! should zero out the new maps */
changes->map.changed|= XkbKeycodesMask;
-generate a NewKeyboard notify here?
+/* generate a NewKeyboard notify here? */
}
}
#endif
diff-tree 0a3740a0000191e3039fe183ae51b938d0548340 (from 8d709f0280b458515b32c2b87938749428e5c149)
Author: Zephaniah E. Hull <warp at agamemnon.b5>
Date: Sun Sep 10 15:49:25 2006 -0400
Typo correction, 'i' is not a '1', so no longer crash on some Xi requests.
diff --git a/Xi/selectev.c b/Xi/selectev.c
index 1f6713a..7d3ef9d 100644
--- a/Xi/selectev.c
+++ b/Xi/selectev.c
@@ -178,7 +178,7 @@ ProcXSelectExtensionEvent(register Clien
return Success;
}
- if (HandleDevicePresenceMask(client, pWin, (XEventClass *) & stuff[i],
+ if (HandleDevicePresenceMask(client, pWin, (XEventClass *) & stuff[1],
&stuff->count) != Success) {
SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0,
BadAlloc);
diff-tree 8d709f0280b458515b32c2b87938749428e5c149 (from 60db190ecfce52cbfa888c0af3210634f9186bed)
Author: Zephaniah E. Hull <warp at agamemnon.b5>
Date: Sun Sep 10 15:48:35 2006 -0400
Remove a merge artifact so that we can compile.
diff --git a/configure.ac b/configure.ac
index 8aa6a34..047857a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1504,7 +1504,6 @@ if test "$KDRIVE" = yes; then
fi
# tslib...
-<<<<<<< HEAD/configure.ac
AC_CHECK_LIB(ts, ts_open, [HAVE_TSLIB="yes"])
if test "x$TSLIB" = xauto && test "x$HAVE_TSLIB" = xyes; then
TSLIB=yes
diff-tree 60db190ecfce52cbfa888c0af3210634f9186bed (from parents)
Merge: 5e9d33fe87f9d24e55c468d4b2bb761c9efdb26a 65256109bb8f5a26704ed960e1dd113981df5787
Author: Zephaniah E. Hull <warp at agamemnon.b5>
Date: Sun Sep 10 03:49:17 2006 -0400
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver
diff-tree 65256109bb8f5a26704ed960e1dd113981df5787 (from 86450998da616e3d00d4d6293acc35eccc2061e7)
Author: Drew Parsons <dparsons at debian.org>
Date: Sun Sep 10 17:40:37 2006 +1000
* Define XPSERVERLIST with `/etc/init.d/xprint get_xpserverlist`
instead of `/bin/sh /etc/init.d/xprint get_xpserverlist`
- allows the initscript to set its own different shell under #!
- allows disabling of XPSERVERLIST by making the script non-executable
* Allow files to be installed by using dist_*_DATA instead of EXTRA_DIST.
Also, use dist_*_SCRIPTS to install scripts.
* Fix minor typos in man pages.
diff --git a/hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile.am b/hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile.am
index 37b57d7..2b73b9d 100644
--- a/hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile.am
+++ b/hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile.am
@@ -1,3 +1,4 @@
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
diff --git a/hw/xprint/config/C/print/models/PSspooldir/Makefile.am b/hw/xprint/config/C/print/models/PSspooldir/Makefile.am
index 52313aa..717cd2c 100644
--- a/hw/xprint/config/C/print/models/PSspooldir/Makefile.am
+++ b/hw/xprint/config/C/print/models/PSspooldir/Makefile.am
@@ -1,3 +1,4 @@
xpcdir = @xpconfigdir@/C/print/models/PSspooldir
-dist_xpc_DATA = model-config spooltodir.sh
+dist_xpc_DATA = model-config
+dist_xpc_SCRIPTS = spooltodir.sh
diff --git a/hw/xprint/config/Makefile.am b/hw/xprint/config/Makefile.am
index a5ea214..197d19d 100644
--- a/hw/xprint/config/Makefile.am
+++ b/hw/xprint/config/Makefile.am
@@ -709,4 +709,4 @@ install-data-local: remove-links
uninstall-hook: remove-links
-EXTRA_DIST = README
+dist_xpconfig_DATA = README
diff --git a/hw/xprint/doc/Xprt.html b/hw/xprint/doc/Xprt.html
index f84a3c1..2aa0c9e 100644
--- a/hw/xprint/doc/Xprt.html
+++ b/hw/xprint/doc/Xprt.html
@@ -4,7 +4,7 @@
applications to use devices like printers, FAX or create
documents in formats like PostScript, PCL or PDF. It may be used by
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
rendering protocol.
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
establish all of its well-known sockets (connection
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.
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>
- (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
</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>
diff --git a/hw/xprint/doc/Xprt.man.pre b/hw/xprint/doc/Xprt.man.pre
index 7599a13..837619c 100644
--- a/hw/xprint/doc/Xprt.man.pre
+++ b/hw/xprint/doc/Xprt.man.pre
@@ -20,7 +20,7 @@ applications to use devices like printer
documents in formats like PostScript, PCL or PDF. It may be used by
clients such as mozilla.
.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
rendering protocol.
Using Xprint an application can search, query and use devices like
@@ -85,7 +85,7 @@ points for clients), but establishes at
one.
.TP
\fB\-XpFile \fIfile\fB\fR
-Sets an altername Xprinters file (see section FILES).
+Sets an alternate Xprinters file (see section FILES).
.TP
\fB\-XpSpoolerType \fIspoolername\fB\fR
Defines the spooler system to be used for print job spooling.
@@ -113,7 +113,7 @@ other
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
.nf
diff --git a/hw/xprint/doc/Xprt.sgml b/hw/xprint/doc/Xprt.sgml
index 0ffa39f..a624992 100644
--- a/hw/xprint/doc/Xprt.sgml
+++ b/hw/xprint/doc/Xprt.sgml
@@ -55,7 +55,7 @@ HTML generation can be done like this:
clients such as <application>mozilla</application>.
</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
rendering protocol.
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>
<listitem>
- <para>Sets an altername Xprinters file (see section FILES).</para>
+ <para>Sets an alternate Xprinters file (see section FILES).</para>
</listitem>
</varlistentry>
<varlistentry>
@@ -178,7 +178,7 @@ HTML generation can be done like this:
<member>other</member>
<member>none</member>
</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
<programlisting>Xprt -h</programlisting>.
</para>
diff --git a/hw/xprint/etc/Xsession.d/Makefile.am b/hw/xprint/etc/Xsession.d/Makefile.am
index e0277d9..3ef8e05 100644
--- a/hw/xprint/etc/Xsession.d/Makefile.am
+++ b/hw/xprint/etc/Xsession.d/Makefile.am
@@ -1 +1,2 @@
-EXTRA_DIST = cde_xsessiond_xprint.sh
+xpcdir = /etc/X11/Xsession.d
+dist_xpc_DATA = cde_xsessiond_xprint.sh
diff --git a/hw/xprint/etc/Xsession.d/cde_xsessiond_xprint.sh b/hw/xprint/etc/Xsession.d/cde_xsessiond_xprint.sh
index 3fb6bba..54c431d 100644
--- a/hw/xprint/etc/Xsession.d/cde_xsessiond_xprint.sh
+++ b/hw/xprint/etc/Xsession.d/cde_xsessiond_xprint.sh
@@ -22,8 +22,8 @@
# Obtain list of Xprint servers
#
-if [ -f "/etc/init.d/xprint" ] ; then
- XPSERVERLIST="`/bin/sh /etc/init.d/xprint get_xpserverlist`"
+if [ -x "/etc/init.d/xprint" ] ; then
+ XPSERVERLIST="`/etc/init.d/xprint get_xpserverlist`"
export XPSERVERLIST
fi
diff-tree 86450998da616e3d00d4d6293acc35eccc2061e7 (from 64479fffa22581cc7d753065c33eda5520b7db9a)
Author: Kristian Høgsberg <krh at redhat.com>
Date: Thu Sep 7 15:35:16 2006 -0400
Fix AIGLX VT switching.
See https://bugs.freedesktop.org/show_bug.cgi?id=7916
There may be a simpler, less intrusive fix that involves just rearranging
DRI locking between 2D and 3D drivers around VT switch.
diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index 41e49e2..b572304 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -73,6 +73,9 @@ struct __GLXDRIscreen {
__DRIscreen driScreen;
void *driver;
+ xf86EnterVTProc *enterVT;
+ xf86LeaveVTProc *leaveVT;
+
unsigned char glx_enable_bits[__GLX_EXT_BYTES];
};
@@ -622,8 +625,7 @@ static __DRIfuncPtr getProcAddress(const
static __DRIscreen *findScreen(__DRInativeDisplay *dpy, int scrn)
{
- __GLXDRIscreen *screen =
- (__GLXDRIscreen *) __glXgetActiveScreen(scrn);
+ __GLXDRIscreen *screen = (__GLXDRIscreen *) __glXgetActiveScreen(scrn);
return &screen->driScreen;
}
@@ -817,6 +819,30 @@ static const __DRIinterfaceMethods inter
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 *
__glXDRIscreenProbe(ScreenPtr pScreen)
{
@@ -842,6 +868,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
char filename[128];
Bool isCapable;
size_t buffer_size;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable")) {
LogMessage(X_ERROR, "AIGLX: DRI module not loaded\n");
@@ -1029,6 +1056,11 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
__glXsetEnterLeaveServerFuncs(__glXDRIenterServer, __glXDRIleaveServer);
+ screen->enterVT = pScrn->EnterVT;
+ pScrn->EnterVT = glxDRIEnterVT;
+ screen->leaveVT = pScrn->LeaveVT;
+ pScrn->LeaveVT = glxDRILeaveVT;
+
LogMessage(X_INFO,
"AIGLX: Loaded and initialized %s\n", filename);
diff --git a/GL/glx/glxext.c b/GL/glx/glxext.c
index fdb8ea2..11fb7fc 100644
--- a/GL/glx/glxext.c
+++ b/GL/glx/glxext.c
@@ -59,10 +59,7 @@ xGLXSingleReply __glXReply;
** A set of state for each client. The 0th one is unused because client
** indices start at 1, not 0.
*/
-__GLXclientState *__glXClients[MAXCLIENTS+1];
-
-
-static Bool inDispatch;
+static __GLXclientState *__glXClients[MAXCLIENTS + 1];
/*
** Forward declarations.
@@ -219,6 +216,10 @@ static Bool DrawableGone(__GLXdrawable *
return True;
}
+static __GLXcontext *glxPendingDestroyContexts;
+static int glxServerLeaveCount;
+static int glxBlockClients;
+
/*
** Free a context.
*/
@@ -236,13 +237,14 @@ GLboolean __glXFreeContext(__GLXcontext
* __glXDispatch() or as a callback from the resource manager. In
* the latter case we need to lift the DRI lock manually. */
- if (!inDispatch)
- __glXleaveServer();
-
- cx->destroy(cx);
-
- if (!inDispatch)
- __glXenterServer();
+ if (glxBlockClients) {
+ __glXleaveServer();
+ cx->destroy(cx);
+ __glXenterServer();
+ } else {
+ cx->next = glxPendingDestroyContexts;
+ glxPendingDestroyContexts = cx;
+ }
return GL_TRUE;
}
@@ -338,7 +340,7 @@ void GlxExtensionInit(void)
/*
** 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;
}
@@ -409,11 +411,43 @@ __GLXcontext *__glXForceCurrent(__GLXcli
/************************************************************************/
-/*
-** Top level dispatcher; all commands are executed from here down.
-*/
+void glxSuspendClients(void)
+{
+ 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
__glXnopEnterServer(void)
@@ -438,14 +472,19 @@ void __glXsetEnterLeaveServerFuncs(void
void __glXenterServer(void)
{
- (*__glXenterServerFunc)();
+ glxServerLeaveCount--;
+
+ if (glxServerLeaveCount == 0)
+ (*__glXenterServerFunc)();
}
void __glXleaveServer(void)
{
- (*__glXleaveServerFunc)();
-}
+ if (glxServerLeaveCount == 0)
+ (*__glXleaveServerFunc)();
+ glxServerLeaveCount++;
+}
/*
** Top level dispatcher; all commands are executed from here down.
@@ -491,6 +530,15 @@ static int __glXDispatch(ClientPtr clien
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.
*/
@@ -500,12 +548,8 @@ static int __glXDispatch(ClientPtr clien
if (proc != NULL) {
__glXleaveServer();
- inDispatch = True;
-
retval = (*proc)(cl, (GLbyte *) stuff);
- inDispatch = False;
-
__glXenterServer();
}
else {
diff --git a/GL/glx/glxserver.h b/GL/glx/glxserver.h
index 8389737..49cad73 100644
--- a/GL/glx/glxserver.h
+++ b/GL/glx/glxserver.h
@@ -136,6 +136,9 @@ void __glXsetEnterLeaveServerFuncs(void
void __glXenterServer(void);
void __glXleaveServer(void);
+void glxSuspendClients(void);
+void glxResumeClients(void);
+
/*
** State kept per client.
*/
@@ -176,8 +179,6 @@ struct __GLXclientStateRec {
char *GLClientextensions;
};
-extern __GLXclientState *__glXClients[];
-
/************************************************************************/
/*
More information about the xorg-commit
mailing list