queue management problem

eric pouech eric.pouech at wanadoo.fr
Sat May 19 06:42:09 CDT 2001


after last night move of queue management to the server, one of my test
app stopped working.
What happens is that it's waiting on a WM_TIMER message, but which is no
longer triggered.
After some investigation, it turned out that message retrieval did
change a bit:
- in previous code, if the QS_PAINT bit was set, but no window to redraw
was found, then
the QS_TIMER bit was tested
- current code, returns from the server a WM_PAINT message in any case,
and if no window
can be found, then we retry the whole loop, and we don't check the timer
case

for my, the wPaintCount was always > 1, meaning that the QS_PAINT bit
was never reset

then, I investigated why the wPaintCount was > 1. It seems that when a
visible window, 
needing some redraw, is hidden before the update takes place, then we
don't update
the paint count (which should be decreased)

the attached patch does take care of it (basically, if we find a hidden
window with an
update region, then we destroy the region, and clear the internal paint
flag), but I don't 
think it's the best place to do it.

any better idea ?

A+
-- 
---------------
Eric Pouech (http://perso.wanadoo.fr/eric.pouech/)
"The future will be better tomorrow", Vice President Dan Quayle
-------------- next part --------------
Index: windows/win.c
===================================================================
RCS file: /usr/share/cvs/cvsroot/wine/wine/windows/win.c,v
retrieving revision 1.130
diff -u -r1.130 win.c
--- windows/win.c	2001/05/18 22:51:57	1.130
+++ windows/win.c	2001/05/19 11:39:54
@@ -367,8 +367,15 @@
     {
         if (!(pWnd->dwStyle & WS_VISIBLE))
         {
-            TRACE("skipping window %04x\n",
-                         pWnd->hwndSelf );
+            TRACE("skipping window %04x\n", pWnd->hwndSelf);
+	    if ((pWnd->flags & WIN_INTERNAL_PAINT) || pWnd->hrgnUpdate)
+	    {
+		 if (pWnd->hrgnUpdate) DeleteObject(pWnd->hrgnUpdate);
+		 pWnd->hrgnUpdate = 0;
+		 pWnd->flags &= ~WIN_INTERNAL_PAINT;
+		 QUEUE_DecPaintCount(hQueue);
+	    }
+	    
         }
         else if ((pWnd->hmemTaskQ == hQueue) &&
                  (pWnd->hrgnUpdate || (pWnd->flags & WIN_INTERNAL_PAINT)))


More information about the wine-devel mailing list