diff options
author | marha <marha@users.sourceforge.net> | 2013-01-22 14:27:38 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-01-22 14:27:38 +0100 |
commit | 7002c66cfba01e7d3b88dae498a195f78f0e83f5 (patch) | |
tree | 2fbbd202a6a4243f0e64a8b22e22417a609ae19d /xorg-server/hw/xwin/winblock.c | |
parent | 50c07563e17397daf040a32d8fdd3ab397e72371 (diff) | |
parent | 470f7ca9f0be348faf2f03fc16811844c5eeffce (diff) | |
download | vcxsrv-7002c66cfba01e7d3b88dae498a195f78f0e83f5.tar.gz vcxsrv-7002c66cfba01e7d3b88dae498a195f78f0e83f5.tar.bz2 vcxsrv-7002c66cfba01e7d3b88dae498a195f78f0e83f5.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
fontconfig libfontenc mesa mkfontscale pixman xserver xkeyboard-config
Conflicts:
mesalib/src/mesa/main/syncobj.c
mesalib/src/mesa/main/syncobj.h
xorg-server/hw/xwin/winconfig.c
xorg-server/hw/xwin/winmultiwindowwndproc.c
Diffstat (limited to 'xorg-server/hw/xwin/winblock.c')
-rw-r--r-- | xorg-server/hw/xwin/winblock.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/xorg-server/hw/xwin/winblock.c b/xorg-server/hw/xwin/winblock.c index a4ae8669f..c3ef4becd 100644 --- a/xorg-server/hw/xwin/winblock.c +++ b/xorg-server/hw/xwin/winblock.c @@ -42,14 +42,26 @@ winBlockHandler(ScreenPtr pScreen, #if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW) winScreenPriv(pScreen); #endif - MSG msg; #ifndef HAS_DEVWINDOWS struct timeval **tvp = pTimeout; if (*tvp != NULL) { + if (GetQueueStatus(QS_ALLINPUT | QS_ALLPOSTMESSAGE) != 0) { + /* If there are still messages to process on the Windows message + queue, make sure select() just polls rather than blocking. + */ + (*tvp)->tv_sec = 0; + (*tvp)->tv_usec = 0; + } + else { + /* Otherwise, lacking /dev/windows, we must wake up again in + a reasonable time to check the Windows message queue. without + noticeable delay. + */ (*tvp)->tv_sec = 0; (*tvp)->tv_usec = 100; + } } #endif @@ -68,24 +80,12 @@ winBlockHandler(ScreenPtr pScreen, if (iReturn != 0) { ErrorF("winBlockHandler - pthread_mutex_unlock () failed: %d\n", iReturn); - goto winBlockHandler_ProcessMessages; } - - winDebug("winBlockHandler - pthread_mutex_unlock () returned\n"); - } - - 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); + else { + winDebug("winBlockHandler - pthread_mutex_unlock () returned\n"); } } +#endif /* At least one X client has asked to suspend the screensaver, so |