From 4201f5a7e1476b298d466832628590d5cf1532b7 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Tue, 23 Feb 2010 13:38:48 +0000 Subject: [PATCH] Process one Windows message per wakeup, rather than all of them. This gives the X server a chance to do stuff as well. Signed-off-by: Jon TURNEY --- hw/xwin/winblock.c | 17 ++--------------- hw/xwin/winwakeup.c | 4 ++-- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/hw/xwin/winblock.c b/hw/xwin/winblock.c index abea60e..a53d4ae 100644 --- a/hw/xwin/winblock.c +++ b/hw/xwin/winblock.c @@ -54,7 +54,7 @@ winBlockHandler (int nScreen, #if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW) winScreenPriv((ScreenPtr)pBlockData); #endif - MSG msg; + #ifndef HAS_DEVWINDOWS struct timeval **tvp = pTimeout; if (*tvp != NULL) @@ -89,18 +89,5 @@ winBlockHandler (int nScreen, 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); - } - } + return; } diff --git a/hw/xwin/winwakeup.c b/hw/xwin/winwakeup.c index e1eece3..411fbc0 100644 --- a/hw/xwin/winwakeup.c +++ b/hw/xwin/winwakeup.c @@ -55,8 +55,8 @@ winWakeupHandler (int nScreen, { MSG msg; - /* Process all messages on our queue */ - while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) + /* Process one message from our queue */ + if (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) { if ((g_hDlgDepthChange == 0 || !IsDialogMessage (g_hDlgDepthChange, &msg)) -- 1.6.6.1