[Bug 12701] watchtower library - listview works slow and wrong

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Jan 29 23:05:27 CST 2009


http://bugs.winehq.org/show_bug.cgi?id=12701


DrkShadow <winehq.10.drkshadow at spamgourmet.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |winehq.10.drkshadow at spamgour
                   |                            |met.com




--- Comment #8 from DrkShadow <winehq.10.drkshadow at spamgourmet.com>  2009-01-29 23:05:26 ---
Looking at Wine 1.1.13, listview.c, LISTVIEW_ProcessLetterKeys...

At line 1593 is a call to lstrncmpiW -- the first param is the item name, the
second param is the search text, so

1. the search is always case insensitive
2. the search always begins at the front of the item name

However, it seems like large lists will still have a problem searching. Usually
I see this in file selection dialogs where it searches and then must redraw the
listview with icons. At line 1549 ListView sets the lastKeyPressTimestamp. It
then performs the search. Only 450ms are allowed between keypresses, so if the
search isn't finished in under half a second before the second key can be
processed, the listview will cancel the search and restart a new search with
only the second typed character.

I propose fixing this by duplicating the line at 1549; at line 1604, insert:
/* Update time count _after_ search in case search was slow */
infoPtr->lastKeyPressTimestamp = GetTickCount();

thus, the second key press time is measured _after_ the search ( and event
processing) is complete, and if the search takes excessively long, it won't
affect the second keypress.


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list