http://bugs.winehq.org/show_bug.cgi?id=31527
Bug #: 31527 Summary: Delphi 7: Header control sends incorrect notifications Product: Wine Version: 1.5.11 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: comctl32 AssignedTo: wine-bugs@winehq.org ReportedBy: djelinski1@gmail.com Classification: Unclassified
noticed when editing a ListView with style Report: when column headers are resized by mouse, the Width property of column header does not change. It changes correctly with native comctl32.
http://bugs.winehq.org/show_bug.cgi?id=31527
--- Comment #1 from Daniel Jelinski djelinski1@gmail.com 2012-08-24 13:55:40 CDT --- Created attachment 41475 --> http://bugs.winehq.org/attachment.cgi?id=41475 sample Delphi app (with source) that demonstrates the problem
See the attached application. With native comctl when you resize the columns and click Update captions, the caption text is set to display actual column's width. With Wine's comctl the text is always set to 50.
http://bugs.winehq.org/show_bug.cgi?id=31527
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com 2012-08-26 02:30:33 CDT --- Confirming.
http://bugs.winehq.org/show_bug.cgi?id=31527
--- Comment #3 from Nikolay Sivov bunglehead@gmail.com 2012-11-24 05:23:19 CST --- The problem here is HDN_ENDTRACKW that's sent instead of expected HDN_ENDTRACKA. Initial notification format is set correctly to NFR_ANSI on control creation, but it gets overridden later with HDM_SETUNICODEFORMAT. So this line in listview.c is questionable:
--- /* set header unicode format */ SendMessageW(infoPtr->hwndHeader, HDM_SETUNICODEFORMAT, TRUE, 0); ---
This is quite an old line (10 years), added with commit 07a308d6. We probably can't do that with header, cause ListView window could be set to NFR_ANSI by its parent and the same parent listens to header notifications in the same format.
http://bugs.winehq.org/show_bug.cgi?id=31527
--- Comment #4 from Daniel Jelinski djelinski1@gmail.com 2012-11-24 08:45:42 CST --- I'm not sure about that. I mean, there are quite a few differences, but HDN_ENDTRACKW is sent under both native and builtin comctl. With native: - header receives LBUTTONUP - header sends HDN_ENDTRACKW to listview - listview sends HDN_ENDTRACKA to form With builtin comctl first 2 points are the same, but listview does not send any notifications to form. There are more differences in +message log later on, but these may be caused by delphi. I didn't have a chance to compare logs from non-subclassed listview yet.
http://bugs.winehq.org/show_bug.cgi?id=31527
--- Comment #5 from Nikolay Sivov bunglehead@gmail.com 2012-11-24 09:31:13 CST --- Listview<->Form interaction is irrelevant here, your 'Update captions' button uses what is stored in Listview control. What I think is that's a header<->Listview problem, cause if I comment this HDM_SETUNICODEFORMAT I get desired behaviour and HDN_TRACKA/W is not forwarded to Listview parent in both cases.
http://bugs.winehq.org/show_bug.cgi?id=31527
--- Comment #6 from Daniel Jelinski djelinski1@gmail.com 2012-12-09 12:19:33 CST --- There was something peculiar about +message logs with native comctl: notification from header to listview is HDN_ENDTRACKW when it is sent, but HDN_ENDTRACKA when it returns. This lead me to suspect that listview modifies the message for the purpose of forwarding it to parent window. Inspection of the existing Wine code revealed that it already forwards some of the notifications, converting them to ANSI if needed. However, the notifications for HDN_TRACK and HDN_ENDTRACK were not forwarded, and the conversion was not done in place, but instead allocated a new structure. I sent a few patches: http://www.winehq.org/pipermail/wine-patches/2012-December/120562.html http://www.winehq.org/pipermail/wine-patches/2012-December/120563.html http://www.winehq.org/pipermail/wine-patches/2012-December/120564.html These patches fix the issue presented by the sample application. However, Delphi's editor is still affected, i.e. when you resize the column header in form editor, the change is still not persisted to dfm file.
Also when testing I noticed that sometimes I can't resize columns on form editor. This issue still needs some work.
http://bugs.winehq.org/show_bug.cgi?id=31527
Daniel Jelinski djelinski1@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |06a0a01e18dc523480b224f9f27 | |0f61ae18843ab Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #7 from Daniel Jelinski djelinski1@gmail.com 2012-12-27 08:39:34 CST --- Well I finally tested Delphi itself with native comctl32. Native didn't help with the remaining issues. I'm marking this bug resolved, as comctl32 issue is fixed.
http://bugs.winehq.org/show_bug.cgi?id=31527
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org 2013-01-04 15:01:05 CST --- Closing bugs fixed in 1.5.21.