summaryrefslogtreecommitdiff
path: root/hw/xwin/winmultiwindowwm.c
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-07-05 18:25:44 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-07-05 18:25:44 +0000
commit20c15003f9648de0c03f7d4fa4508afd896b19f5 (patch)
tree7e2cc840d40bd0eaa8177b32600cdab5c6a3d893 /hw/xwin/winmultiwindowwm.c
parentd72fef26d44e649f39a56730830148d48d77ee9e (diff)
Fix crash on server shutdown
Diffstat (limited to 'hw/xwin/winmultiwindowwm.c')
-rw-r--r--hw/xwin/winmultiwindowwm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c
index 3727474e9..03f179345 100644
--- a/hw/xwin/winmultiwindowwm.c
+++ b/hw/xwin/winmultiwindowwm.c
@@ -981,6 +981,9 @@ winMultiWindowXMsgProc (void *pArg)
/* Loop until we explicitly break out */
while (1)
{
+ if (g_shutdown)
+ break;
+
if (pProcArg->pWMInfo->fAllowOtherWM && !XPending (pProcArg->pDisplay))
{
if (CheckAnotherWindowManager (pProcArg->pDisplay, pProcArg->dwScreen))
@@ -1061,6 +1064,10 @@ winMultiWindowXMsgProc (void *pArg)
winSendMessageToWM (pProcArg->pWMInfo, &msg);
}
}
+
+ XCloseDisplay (pProcArg->pDisplay);
+ pthread_exit (NULL);
+
}
@@ -1338,6 +1345,9 @@ winMultiWindowWMIOErrorHandler (Display *pDisplay)
{
ErrorF ("\nwinMultiWindowWMIOErrorHandler!\n\n");
+ if (g_shutdown)
+ pthread_exit(NULL);
+
/* Restart at the main entry point */
longjmp (g_jmpWMEntry, WIN_JMP_ERROR_IO);