[Wine] Re: Bug with letters in newer Wine-versions

Walt Ogburn reuben at ugcs.caltech.edu
Sat Oct 15 10:21:49 CDT 2005

Thanks Dan.  I added my findings - but I don't have permission to change
the status to confirmed, and I don't have time to investigate any more

On Fri, 14 Oct 2005, Dan Kegel wrote:

> Filed as http://bugs.winehq.org/show_bug.cgi?id=3579


Bug confirmed.  Further information:

The text in question is inside an edit control (dlls/user/edit.c).  A
patch in February added checks inside EDIT_EM_ReplaceSel to make sure that
the text will fit inside the available box.  Before this, there was no
such check.


In the current code, this check is ignored if honor_limit is false.  If
honor_limit is true and the replacement (or new) text appears to be too
long, the edit control is left unchanged.  The message in IBasic is
calculated as taking up too many lines, which is why it does not appear
nown, but did appear before the line-number check was added.

Details about this particular message: the edit control has its top at
pixel 0 and its bottom at pixel 48.  The line_height property is 16, The
calculated number of lines required is line_count=5, and the calculated
number of lines available is vlc=3.  Because 3 < 5, EDIT_EM_ReplaceSel
concludes that the message is too long and doesn't display it.  If I turn
off the length checking to make the message appear, it requires only 4
lines, and the actual offset of one line from the previous one is 14

>From these details, there are three distinct things that look wrong to me.

1. Each line requires 14 pixels, but line_height=16.  Why don't they match?
2. The message is calculated to require 5 lines, when it really only needs
four.  I think this is a problem in EDIT_BuildLineDefs_ML.
3. If #1 and #2 were fixed, we'd need 14 pixels * 4 lines = 56 pixels, and
the edit control only has 48 pixels, so the length check would still fail.
Maybe something else is wrong?

More information about the wine-users mailing list