http://bugs.winehq.org/show_bug.cgi?id=15352
Summary: TSLPatcher: rtf header should be centered, instead half outside window Product: Wine Version: 1.1.5 Platform: PC URL: http://knightsoftheoldrepublic.filefront.com/file/Playab le_Echani;85178 OS/Version: Linux Status: UNCONFIRMED Severity: trivial Priority: P2 Component: richedit AssignedTo: wine-bugs@winehq.org ReportedBy: knan-wine@anduin.net CC: eric.pouech@orange.fr
Created an attachment (id=16185) --> (http://bugs.winehq.org/attachment.cgi?id=16185) +richedit log on 1.1.5
This one is a bit baffling. The rtf file looks fine when viewed with "wine wordpad tslpatchdata/info.rtf", but not in the installer. The bug disappears with winetricks riched20.
There is a header that should be centered, but instead is left-justified and loses a few characters to the left of the window (or has them eaten by control characters).
Regression introduced in 0.9.58, by:
33d7cea120bd7d37175cd5c89aa2a66d5c909f37 is first bad commit commit 33d7cea120bd7d37175cd5c89aa2a66d5c909f37 Author: Eric Pouech eric.pouech@orange.fr Date: Sun Mar 16 21:48:05 2008 +0100
richedit: Added support for EM_SETTARGETDEVICE with a NULL DC.
:040000 040000 4dfb836db1ced05c43cf096a871a6905dba27193 ac9128d672dd75a2aea0e3f99a09cdfc20498eac M dlls
Wine-0.9.58 + this reverted looks fine.
Revert on 1.1.5 has conflicts that I couldn't resolve off-hand.
http://bugs.winehq.org/show_bug.cgi?id=15352
knan-wine@anduin.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, regression
http://bugs.winehq.org/show_bug.cgi?id=15352
Dylan Smith dylan.ah.smith@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dylan.ah.smith@gmail.com Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #1 from Dylan Smith dylan.ah.smith@gmail.com 2008-10-10 04:31:19 --- I see two issues here: 1. Word wrapping is disabled in Wine but enabled in Windows 2. Centered text is not displayed properly without word wrapping.
For #1 I still need to figure out what else disabled/enables word wrapping since it doesn't use EM_SETTARGETDEVICE. This seems similar to the remaining issue in Bug 12567. Any leads on this one would be great, but for now I am fresh out of ideas.
The reason the rtf file opens properly in wordpad is that Wine's wordpad always enables word wrapping, so neither issue is noticed. I modified wordpad to disable word wrapping using the WS_HSCROLL style flag, and then saw both issues.
Issue #2 will not be noticeable for this but one #1 is fixed, and probably isn't actually a regression, since I don't know if it was ever working. What is happening here is that the available width is being set to the largest positive integer (0x7FFFFFFF) to avoid wrapping, so the centered text gets drawn at about just under half that size (e.g. 0x3FFFFFF8).
It seems like somewhere in ExtTextOutW the x value probably to get truncated to a short, so 0x3FFFFFF8 would become 0xFFF8 and get interpreted as -8, and the text seems centered at 0. This would be why the start of the text gets truncated. I tested with builtin richedit on Windows and the behaviour was the same, so this is expected behaviour for ExtTextOutW.
http://bugs.winehq.org/show_bug.cgi?id=15352
--- Comment #2 from Dylan Smith dylan.ah.smith@gmail.com 2008-10-10 16:07:53 --- Created an attachment (id=16571) --> (http://bugs.winehq.org/attachment.cgi?id=16571) richedit: Fixed centering and right align with word wrap disabled.
This fixes the text centering issue when word wrapping is disabled by centering text to the window size, or left aligning the centered text if it is longer than the window width. This seems to be consistent with Windows when wrapping is disabled on window creation with ES_AUTOHSCROLL and/or WS_HSCROLL.
I did notice another inconsistency when I tried to disable word wrapping with EM_SETTARGETDEVICE. For some reason this caused the native richedit control to left align all text with word wrapping disabled. Again, there is something I am missing because native wordpad seems to use this message to disable wrapping, and still leaves centered text aligned to the center of the window.
http://bugs.winehq.org/show_bug.cgi?id=15352
Dylan Smith dylan.ah.smith@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
--- Comment #3 from Dylan Smith dylan.ah.smith@gmail.com 2008-10-10 16:43:37 --- (In reply to comment #2) [...]
I did notice another inconsistency when I tried to disable word wrapping with EM_SETTARGETDEVICE. For some reason this caused the native richedit control to left align all text with word wrapping disabled. Again, there is something I am missing because native wordpad seems to use this message to disable wrapping, and still leaves centered text aligned to the center of the window.
This inconsistency appears to be between native riched20.dll and msftedit.dll behaviour. This means that my patch would be behaving as msftedit.dll, which is the behaviour that I have been emulate in Wine's riched20.dll.
So I think that patch would fix issue #2 that I mentioned "Centered text is not displayed properly without word wrapping." I'll try to get the patch accepted, then I think this bug would be resolved, since the other issue I noticed was already reported in Bug 12567.
http://bugs.winehq.org/show_bug.cgi?id=15352
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
http://bugs.winehq.org/show_bug.cgi?id=15352
Dylan Smith dylan.ah.smith@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #16571|0 |1 is obsolete| |
--- Comment #4 from Dylan Smith dylan.ah.smith@gmail.com 2008-10-15 12:37:04 --- (From update of attachment 16571) Patch is in the git tree as commit 1ed84f0dcc475db75ba54250407065e0b0dffd42
I believe this bug is fixed in the Git tree now.
http://bugs.winehq.org/show_bug.cgi?id=15352
knan-wine@anduin.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED
--- Comment #5 from knan-wine@anduin.net 2008-10-15 13:32:54 --- Agreed. Only missing wordwrapping as per bug 12567 left now. (Incidentally, the missing part of that bug now is completely reversed from the description line, heh.)
http://bugs.winehq.org/show_bug.cgi?id=15352
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org 2008-10-24 11:13:58 --- Closing bugs fixed in 1.1.7.