summaryrefslogtreecommitdiff
path: root/Xext
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-04-24 11:32:36 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-04-24 11:32:36 +0930
commitd0890c40b9a9c7965c08608e6950c078a29aac16 (patch)
treefe12f27ec4e66299bb92539ae98f561910bf33b4 /Xext
parent745b90cde1007383ec8c887f02439a34ab427f31 (diff)
Xext: add a few lines of comments to XGE.
Diffstat (limited to 'Xext')
-rw-r--r--Xext/geext.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/Xext/geext.c b/Xext/geext.c
index c6c871390..19763a034 100644
--- a/Xext/geext.c
+++ b/Xext/geext.c
@@ -178,7 +178,7 @@ static void GEClientCallback(CallbackListPtr *list,
pGEClient->minor_version = 0;
}
-/* reset extension */
+/* Reset extension. Called on server shutdown. */
static void
GEResetProc(ExtensionEntry *extEntry)
{
@@ -190,7 +190,13 @@ GEResetProc(ExtensionEntry *extEntry)
GEEventType = 0;
}
-/* Calls the registered event swap function for the extension. */
+/* Calls the registered event swap function for the extension.
+ *
+ * Each extension can register a swap function to handle GenericEvents being
+ * swapped properly. The server calls SGEGenericEvent() before the event is
+ * written on the wire, this one calls the registered swap function to do the
+ * work.
+ */
static void
SGEGenericEvent(xEvent* from, xEvent* to)
{
@@ -207,7 +213,10 @@ SGEGenericEvent(xEvent* from, xEvent* to)
GEExtensions[gefrom->extension & 0x7F].evswap(gefrom, geto);
}
-/* init extension, register at server */
+/* Init extension, register at server.
+ * Since other extensions may rely on XGE (XInput does already), it is a good
+ * idea to init XGE first, before any other extension.
+ */
void
GEExtensionInit(void)
{
@@ -357,8 +366,8 @@ void GEWindowSetMask(ClientPtr pClient, DeviceIntPtr pDev,
{
pWin->optional->geMasks->geClients = cli->next;
xfree(cli);
- } else
- {
+ } else
+ {
GenericMaskPtr prev = cli;
cli = cli->next;