diff --git a/dix/dispatch.c b/dix/dispatch.c index dac29ae5d..1bbd7320c 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -565,6 +565,8 @@ Dispatch(void) #if XTRANS_SEND_FDS /* close down all unused passed fd's */ for (int x=0; xrecv_fd_list[x] >= 0) + fprintf(stderr, "closing unused received fd: %d\n", client->recv_fd_list[x]); close(client->recv_fd_list[x]); client->recv_fd_list[x] = -1; } @@ -581,6 +583,7 @@ Dispatch(void) #endif if (client->noClientException != Success) { + fprintf(stderr, "calling CloseDownClient() II\n"); CloseDownClient(client); break; } @@ -3351,8 +3354,10 @@ CloseDownRetainedResources(void) for (i = 1; i < currentMaxClients; i++) { client = clients[i]; if (client && (client->closeDownMode == RetainTemporary) - && (client->clientGone)) + && (client->clientGone)) { + fprintf(stderr, "calling CloseDownClient (retained)\n"); CloseDownClient(client); + } } } @@ -3363,6 +3368,8 @@ ProcKillClient(ClientPtr client) ClientPtr killclient; int rc; + fprintf(stderr, "ProcKillClient\n"); + REQUEST_SIZE_MATCH(xResourceReq); if (stuff->id == AllTemporary) { CloseDownRetainedResources(); @@ -3505,6 +3512,8 @@ CloseDownClient(ClientPtr client) Bool really_close_down = client->clientGone || client->closeDownMode == DestroyAll; + fprintf(stderr, "in CloseDownClient()\n"); + if (!client->clientGone) { /* ungrab server if grabbing client dies */ if (grabState != GrabNone && grabClient == client) { @@ -3538,6 +3547,7 @@ CloseDownClient(ClientPtr client) if (ClientIsAsleep(client)) ClientSignal(client); ProcessWorkQueueZombies(); + fprintf(stderr, "calling CloseDownConnection\n"); CloseDownConnection(client); output_pending_clear(client); mark_client_not_ready(client); @@ -3584,8 +3594,12 @@ CloseDownClient(ClientPtr client) currentMaxClients--; } - if (ShouldDisconnectRemainingClients()) + if (ShouldDisconnectRemainingClients()) { + fprintf(stderr, "ShouldDisconnectRemainingClients() enabled\n"); SetDispatchExceptionTimer(); + } else { + fprintf(stderr, "ShouldDisconnectRemainingClients() disabled\n"); + } } static void @@ -3593,6 +3607,8 @@ KillAllClients(void) { int i; + fprintf(stderr, "KillAllClients()\n"); + for (i = 1; i < currentMaxClients; i++) if (clients[i]) { /* Make sure Retained clients are released. */ diff --git a/hw/xfree86/os-support/linux/lnx_acpi.c b/hw/xfree86/os-support/linux/lnx_acpi.c index aaf6bb5c9..76862dda5 100644 --- a/hw/xfree86/os-support/linux/lnx_acpi.c +++ b/hw/xfree86/os-support/linux/lnx_acpi.c @@ -154,6 +154,7 @@ lnxACPIOpen(void) LogMessageVerb(X_WARNING, 3, "Open ACPI failed (%s) (%s)\n", ACPI_SOCKET, strerror(errno)); warned = 1; + fprintf(stderr, "shutdown()\n"); shutdown(fd, 2); close(fd); return NULL; @@ -177,6 +178,7 @@ lnxCloseACPI(void) DebugF("ACPI: Closing device\n"); if (ACPIihPtr) { fd = xf86RemoveGeneralHandler(ACPIihPtr); + fprintf(stderr, "shutdown()\n"); shutdown(fd, 2); close(fd); ACPIihPtr = NULL; diff --git a/hw/xnest/Display.c b/hw/xnest/Display.c index fa90de4ce..59c786c8a 100644 --- a/hw/xnest/Display.c +++ b/hw/xnest/Display.c @@ -140,6 +140,8 @@ xnestCloseDisplay(void) xnestVisualMap = NULL; xnestNumVisualMap = 0; + fprintf(stderr, "xnestCloseDisplay()\n"); + xcb_disconnect(xnestUpstreamInfo.conn); xnestUpstreamInfo.conn = NULL; xnestUpstreamInfo.screenInfo = NULL; diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c index 08dc3533c..6e0df3409 100644 --- a/hw/xnest/Events.c +++ b/hw/xnest/Events.c @@ -194,10 +194,13 @@ xnest_handle_event(xcb_generic_event_t *event) case DestroyNotify: { + fprintf(stderr, "DestroyNotify\n"); xcb_destroy_notify_event_t *ev = (xcb_destroy_notify_event_t*)event; if (xnestParentWindow && - ev->window == xnestParentWindow) + ev->window == xnestParentWindow) { + fprintf(stderr, "it's our parent window\n"); exit(0); + } break; }