diff options
Diffstat (limited to 'hw/xwin/winblock.c')
-rw-r--r-- | hw/xwin/winblock.c | 77 |
1 files changed, 35 insertions, 42 deletions
diff --git a/hw/xwin/winblock.c b/hw/xwin/winblock.c index e165d5488..c18d080fa 100644 --- a/hw/xwin/winblock.c +++ b/hw/xwin/winblock.c @@ -36,61 +36,54 @@ /* See Porting Layer Definition - p. 6 */ void -winBlockHandler (int nScreen, - pointer pBlockData, - pointer pTimeout, - pointer pReadMask) +winBlockHandler(int nScreen, + pointer pBlockData, pointer pTimeout, pointer pReadMask) { #if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW) - winScreenPriv((ScreenPtr)pBlockData); + winScreenPriv((ScreenPtr) pBlockData); #endif - MSG msg; + MSG msg; + #ifndef HAS_DEVWINDOWS - struct timeval **tvp = pTimeout; - if (*tvp != NULL) - { - (*tvp)->tv_sec = 0; - (*tvp)->tv_usec = 100; - } + struct timeval **tvp = pTimeout; + + if (*tvp != NULL) { + (*tvp)->tv_sec = 0; + (*tvp)->tv_usec = 100; + } #endif #if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW) - /* Signal threaded modules to begin */ - if (pScreenPriv != NULL && !pScreenPriv->fServerStarted) - { - int iReturn; - - winDebug ("winBlockHandler - Releasing pmServerStarted\n"); + /* Signal threaded modules to begin */ + if (pScreenPriv != NULL && !pScreenPriv->fServerStarted) { + int iReturn; + + winDebug("winBlockHandler - Releasing pmServerStarted\n"); - /* Flag that modules are to be started */ - pScreenPriv->fServerStarted = TRUE; + /* Flag that modules are to be started */ + pScreenPriv->fServerStarted = TRUE; - /* Unlock the mutex for threaded modules */ - iReturn = pthread_mutex_unlock (&pScreenPriv->pmServerStarted); - if (iReturn != 0) - { - ErrorF ("winBlockHandler - pthread_mutex_unlock () failed: %d\n", - iReturn); - goto winBlockHandler_ProcessMessages; - } + /* Unlock the mutex for threaded modules */ + iReturn = pthread_mutex_unlock(&pScreenPriv->pmServerStarted); + if (iReturn != 0) { + ErrorF("winBlockHandler - pthread_mutex_unlock () failed: %d\n", + iReturn); + goto winBlockHandler_ProcessMessages; + } - winDebug ("winBlockHandler - pthread_mutex_unlock () returned\n"); + winDebug("winBlockHandler - pthread_mutex_unlock () returned\n"); } -winBlockHandler_ProcessMessages: + winBlockHandler_ProcessMessages: #endif - /* Process all messages on our queue */ - while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) - { - if ((g_hDlgDepthChange == 0 - || !IsDialogMessage (g_hDlgDepthChange, &msg)) - && (g_hDlgExit == 0 - || !IsDialogMessage (g_hDlgExit, &msg)) - && (g_hDlgAbout == 0 - || !IsDialogMessage (g_hDlgAbout, &msg))) - { - DispatchMessage (&msg); - } + /* Process all messages on our queue */ + while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { + if ((g_hDlgDepthChange == 0 + || !IsDialogMessage(g_hDlgDepthChange, &msg)) + && (g_hDlgExit == 0 || !IsDialogMessage(g_hDlgExit, &msg)) + && (g_hDlgAbout == 0 || !IsDialogMessage(g_hDlgAbout, &msg))) { + DispatchMessage(&msg); + } } } |