diff options
Diffstat (limited to 'xorg-server/dix/dispatch.c')
-rw-r--r-- | xorg-server/dix/dispatch.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c index 87b27dfa6..5e1c858b6 100644 --- a/xorg-server/dix/dispatch.c +++ b/xorg-server/dix/dispatch.c @@ -134,6 +134,7 @@ int ProcInitialConnection(); #include "inputstr.h"
#include "xkbsrv.h"
#include "site.h"
+#include "client.h"
#ifdef XSERVER_DTRACE
#include "registry.h"
@@ -3500,6 +3501,9 @@ CloseDownClient(ClientPtr client) CallCallbacks((&ClientStateCallback), (pointer)&clientinfo);
}
FreeClientResources(client);
+ /* Disable client ID tracking. This must be done after
+ * ClientStateCallback. */
+ ReleaseClientIds(client);
#ifdef XSERVER_DTRACE
XSERVER_CLIENT_DISCONNECT(client->index);
#endif
@@ -3537,6 +3541,7 @@ void InitClient(ClientPtr client, int i, pointer ospriv) client->smart_start_tick = SmartScheduleTime;
client->smart_stop_tick = SmartScheduleTime;
client->smart_check_tick = SmartScheduleTime;
+ client->clientIds = NULL;
}
/************************
@@ -3576,6 +3581,11 @@ ClientPtr NextAvailableClient(pointer ospriv) currentMaxClients++;
while ((nextFreeClientID < MAXCLIENTS) && clients[nextFreeClientID])
nextFreeClientID++;
+
+ /* Enable client ID tracking. This must be done before
+ * ClientStateCallback. */
+ ReserveClientIds(client);
+
if (ClientStateCallback)
{
NewClientInfoRec clientinfo;
|