hack
This commit is contained in:
parent
6c9ef7905a
commit
3a317cdd8b
|
@ -565,6 +565,8 @@ Dispatch(void)
|
||||||
#if XTRANS_SEND_FDS
|
#if XTRANS_SEND_FDS
|
||||||
/* close down all unused passed fd's */
|
/* close down all unused passed fd's */
|
||||||
for (int x=0; x<MAX_CLIENT_RECV_FD; x++) {
|
for (int x=0; x<MAX_CLIENT_RECV_FD; x++) {
|
||||||
|
if (client->recv_fd_list[x] >= 0)
|
||||||
|
fprintf(stderr, "closing unused received fd: %d\n", client->recv_fd_list[x]);
|
||||||
close(client->recv_fd_list[x]);
|
close(client->recv_fd_list[x]);
|
||||||
client->recv_fd_list[x] = -1;
|
client->recv_fd_list[x] = -1;
|
||||||
}
|
}
|
||||||
|
@ -581,6 +583,7 @@ Dispatch(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (client->noClientException != Success) {
|
if (client->noClientException != Success) {
|
||||||
|
fprintf(stderr, "calling CloseDownClient() II\n");
|
||||||
CloseDownClient(client);
|
CloseDownClient(client);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3351,8 +3354,10 @@ CloseDownRetainedResources(void)
|
||||||
for (i = 1; i < currentMaxClients; i++) {
|
for (i = 1; i < currentMaxClients; i++) {
|
||||||
client = clients[i];
|
client = clients[i];
|
||||||
if (client && (client->closeDownMode == RetainTemporary)
|
if (client && (client->closeDownMode == RetainTemporary)
|
||||||
&& (client->clientGone))
|
&& (client->clientGone)) {
|
||||||
|
fprintf(stderr, "calling CloseDownClient (retained)\n");
|
||||||
CloseDownClient(client);
|
CloseDownClient(client);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3363,6 +3368,8 @@ ProcKillClient(ClientPtr client)
|
||||||
ClientPtr killclient;
|
ClientPtr killclient;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
fprintf(stderr, "ProcKillClient\n");
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xResourceReq);
|
REQUEST_SIZE_MATCH(xResourceReq);
|
||||||
if (stuff->id == AllTemporary) {
|
if (stuff->id == AllTemporary) {
|
||||||
CloseDownRetainedResources();
|
CloseDownRetainedResources();
|
||||||
|
@ -3505,6 +3512,8 @@ CloseDownClient(ClientPtr client)
|
||||||
Bool really_close_down = client->clientGone ||
|
Bool really_close_down = client->clientGone ||
|
||||||
client->closeDownMode == DestroyAll;
|
client->closeDownMode == DestroyAll;
|
||||||
|
|
||||||
|
fprintf(stderr, "in CloseDownClient()\n");
|
||||||
|
|
||||||
if (!client->clientGone) {
|
if (!client->clientGone) {
|
||||||
/* ungrab server if grabbing client dies */
|
/* ungrab server if grabbing client dies */
|
||||||
if (grabState != GrabNone && grabClient == client) {
|
if (grabState != GrabNone && grabClient == client) {
|
||||||
|
@ -3538,6 +3547,7 @@ CloseDownClient(ClientPtr client)
|
||||||
if (ClientIsAsleep(client))
|
if (ClientIsAsleep(client))
|
||||||
ClientSignal(client);
|
ClientSignal(client);
|
||||||
ProcessWorkQueueZombies();
|
ProcessWorkQueueZombies();
|
||||||
|
fprintf(stderr, "calling CloseDownConnection\n");
|
||||||
CloseDownConnection(client);
|
CloseDownConnection(client);
|
||||||
output_pending_clear(client);
|
output_pending_clear(client);
|
||||||
mark_client_not_ready(client);
|
mark_client_not_ready(client);
|
||||||
|
@ -3584,8 +3594,12 @@ CloseDownClient(ClientPtr client)
|
||||||
currentMaxClients--;
|
currentMaxClients--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ShouldDisconnectRemainingClients())
|
if (ShouldDisconnectRemainingClients()) {
|
||||||
|
fprintf(stderr, "ShouldDisconnectRemainingClients() enabled\n");
|
||||||
SetDispatchExceptionTimer();
|
SetDispatchExceptionTimer();
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "ShouldDisconnectRemainingClients() disabled\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -3593,6 +3607,8 @@ KillAllClients(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
fprintf(stderr, "KillAllClients()\n");
|
||||||
|
|
||||||
for (i = 1; i < currentMaxClients; i++)
|
for (i = 1; i < currentMaxClients; i++)
|
||||||
if (clients[i]) {
|
if (clients[i]) {
|
||||||
/* Make sure Retained clients are released. */
|
/* Make sure Retained clients are released. */
|
||||||
|
|
|
@ -154,6 +154,7 @@ lnxACPIOpen(void)
|
||||||
LogMessageVerb(X_WARNING, 3, "Open ACPI failed (%s) (%s)\n",
|
LogMessageVerb(X_WARNING, 3, "Open ACPI failed (%s) (%s)\n",
|
||||||
ACPI_SOCKET, strerror(errno));
|
ACPI_SOCKET, strerror(errno));
|
||||||
warned = 1;
|
warned = 1;
|
||||||
|
fprintf(stderr, "shutdown()\n");
|
||||||
shutdown(fd, 2);
|
shutdown(fd, 2);
|
||||||
close(fd);
|
close(fd);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -177,6 +178,7 @@ lnxCloseACPI(void)
|
||||||
DebugF("ACPI: Closing device\n");
|
DebugF("ACPI: Closing device\n");
|
||||||
if (ACPIihPtr) {
|
if (ACPIihPtr) {
|
||||||
fd = xf86RemoveGeneralHandler(ACPIihPtr);
|
fd = xf86RemoveGeneralHandler(ACPIihPtr);
|
||||||
|
fprintf(stderr, "shutdown()\n");
|
||||||
shutdown(fd, 2);
|
shutdown(fd, 2);
|
||||||
close(fd);
|
close(fd);
|
||||||
ACPIihPtr = NULL;
|
ACPIihPtr = NULL;
|
||||||
|
|
|
@ -140,6 +140,8 @@ xnestCloseDisplay(void)
|
||||||
xnestVisualMap = NULL;
|
xnestVisualMap = NULL;
|
||||||
xnestNumVisualMap = 0;
|
xnestNumVisualMap = 0;
|
||||||
|
|
||||||
|
fprintf(stderr, "xnestCloseDisplay()\n");
|
||||||
|
|
||||||
xcb_disconnect(xnestUpstreamInfo.conn);
|
xcb_disconnect(xnestUpstreamInfo.conn);
|
||||||
xnestUpstreamInfo.conn = NULL;
|
xnestUpstreamInfo.conn = NULL;
|
||||||
xnestUpstreamInfo.screenInfo = NULL;
|
xnestUpstreamInfo.screenInfo = NULL;
|
||||||
|
|
|
@ -194,10 +194,13 @@ xnest_handle_event(xcb_generic_event_t *event)
|
||||||
|
|
||||||
case DestroyNotify:
|
case DestroyNotify:
|
||||||
{
|
{
|
||||||
|
fprintf(stderr, "DestroyNotify\n");
|
||||||
xcb_destroy_notify_event_t *ev = (xcb_destroy_notify_event_t*)event;
|
xcb_destroy_notify_event_t *ev = (xcb_destroy_notify_event_t*)event;
|
||||||
if (xnestParentWindow &&
|
if (xnestParentWindow &&
|
||||||
ev->window == xnestParentWindow)
|
ev->window == xnestParentWindow) {
|
||||||
|
fprintf(stderr, "it's our parent window\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue