Hi again,
Another bug I have spotted can be demonstrated clearly by dir /s /w on wcmd on a small set of directories a couple of times (once my patch for /w is on). The first time it writes to the screen without scrolling and all is ok, the second time as it scrolls, it misses off 'Total files listed' and 'bytes free' two lines near the bottom.
Basically the wineconsole is not being updated 100% correctly and skips some lines. Looking closely at the wineconsole code (by dumping out the screen at each event) I have worked out what is going on, but am not 100% sure about the 'proper' way to fix it.
The problem is the console routines generally generate a sequence of events (assume an n line screen) v-scroll(x) (Make the xth line of the buffer the top line) update(x+n, x+n) (Write to the new bottom line of the screen)
In the failing case I see
v-scroll(x) (Make the xth line of the buffer the top line) update(x+n, x+n) (Write to the new bottom line of the screen) update(x+n+2, x+n+3) (Write beyond the bottom line of the screen)
Although the data is retrieved correctly, it never gets displayed (An invalidaterect appears to happen)
A simple way of avoiding this is to update wineconsole as follows: case CONSOLE_RENDERER_UPDATE_EVENT: Trace(1, " update(%d,%d)", evts[i].u.update.top, evts[i].u.update.bottom);
/* test fix - Force updates to occur on visible screen */ if ((data->curcfg.win_pos.Y+data->curcfg.win_height) < evts[i].u.update.bottom) { Trace(1, " Forced vscroll \n"); data->fnScroll(data, evts[i].u.update.bottom - data->curcfg.win_height, FALSE); data->fnPosCursor(data); } else if (data->curcfg.win_pos.Y > evts[i].u.update.top) { Trace(1, " Forced vscroll2 \n"); data->fnScroll(data, evts[i].u.update.top, FALSE); data->fnPosCursor(data); }
WINECON_FetchCells(data, evts[i].u.update.top, evts[i].u.update.bottom);
The question is, is this correct, or is the server generating incorrect events, is the refresh not occurring properly etc?
Thoughts please? Regards, Jason
jason @ the-edmeades.demon.co.uk
Ann and Jason Edmeades a écrit :
Hi again,
Another bug I have spotted can be demonstrated clearly by dir /s /w on wcmd on a small set of directories a couple of times (once my patch for /w is on). The first time it writes to the screen without scrolling and all is ok, the second time as it scrolls, it misses off 'Total files listed' and 'bytes free' two lines near the bottom.
which wine version are you using ? I've fixed a similar bug a month ago ; I also tried your example and couldn't reproduce the bug here... A+
Eric Pouech a écrit :
Ann and Jason Edmeades a écrit :
Hi again,
Another bug I have spotted can be demonstrated clearly by dir /s /w on wcmd on a small set of directories a couple of times (once my patch for /w is on). The first time it writes to the screen without scrolling and all is ok, the second time as it scrolls, it misses off 'Total files listed' and 'bytes free' two lines near the bottom.
which wine version are you using ? I've fixed a similar bug a month ago ; I also tried your example and couldn't reproduce the bug here...
testing with smaller directories now show the problem I'll look into it A+
I'll look into it
the attached patch should fix the issue A+
Index: programs/wineconsole/user.c =================================================================== RCS file: /home/cvs/cvsroot/wine/wine/programs/wineconsole/user.c,v retrieving revision 1.8 diff -u -r1.8 user.c --- programs/wineconsole/user.c 23 Mar 2002 20:14:04 -0000 1.8 +++ programs/wineconsole/user.c 1 May 2002 07:40:31 -0000 @@ -642,6 +702,7 @@ */ static void WCUSER_Refresh(const struct inner_data* data, int tp, int bm) { + WCUSER_FillMemDC(data, tp, bm); if (data->curcfg.win_pos.Y <= bm && data->curcfg.win_pos.Y + data->curcfg.win_height >= tp) { RECT r; @@ -651,7 +712,6 @@ r.top = (tp - data->curcfg.win_pos.Y) * data->curcfg.cell_height; r.bottom = (bm - data->curcfg.win_pos.Y + 1) * data->curcfg.cell_height; InvalidateRect(PRIVATE(data)->hWnd, &r, FALSE); - WCUSER_FillMemDC(data, tp, bm); UpdateWindow(PRIVATE(data)->hWnd); } }
It did - Thank you! Can you please submit...
Thanks again, Jason
-----Original Message----- From: eric [mailto:eric]On Behalf Of Eric Pouech Sent: 01 May 2002 08:48 To: Ann and Jason Edmeades; wine devel Subject: Re: wineconsole (Eric?) problem
I'll look into it
the attached patch should fix the issue A+