[Bug 52534] New: ListView: multi select never sends LVN_ODSTATECHANGED

WineHQ Bugzilla wine-bugs at winehq.org
Wed Feb 9 21:09:03 CST 2022


https://bugs.winehq.org/show_bug.cgi?id=52534

            Bug ID: 52534
           Summary: ListView: multi select never sends LVN_ODSTATECHANGED
           Product: Wine
           Version: 7.1
          Hardware: x86-64
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: comctl32
          Assignee: wine-bugs at winehq.org
          Reporter: winehq-bugs at angelohaller.com
      Distribution: ---

When using a ListView in virtual mode (LVS_OWNERDATA) and selecting multiple
rows (holding down shift and selecting) the message code LVN_ODSTATECHANGED is
never sent.

Looking through the wine source, there is definitely code present sending
LVN_ODSTATECHANGED, this however never reaches the application and hence is a
bug.

Running the same application in Windows 7 will however send the
LVN_ODSTATECHANGED code.

This seems to be true for ALL programs using LVS_OWNERDATA and supporting multi
select.

This is an issue that arose working on
https://github.com/libui-ng/libui-ng/pull/73

A nicer example to reproduce would be from the `Windows classic samples`. I
forked the official Microsoft repo to add some debug printing:

1. Clone https://github.com/szanni/Windows-classic-samples
2. Change to directory Samples/Win7Samples/winui/controls/common/vlistvw
3. Build VListVw (I cross compile via `x86_64-w64-mingw32-gcc VListVw.c
-lcomctl32` but using the vcproj should work too?) or use the test binary a.exe
(linked at the bottom)
4. Run the resulting .exe
5. Select a cell (should print `LVN_ITEMCHANGED`)
6. Hold down `shift` and select a cell a few rows down below.

On Windows 7 step 6. triggers the message `LVN_ODSTATECHANGED` to be emitted
(as can be seen in the debug print statements). wine however never sends this
message.
This is contrary to the documentation provided in
https://docs.microsoft.com/en-us/windows/win32/controls/lvn-itemchanged#remarks
and behavior developers rely on.

Test binary:
https://github.com/szanni/Windows-classic-samples/blob/main/Samples/Win7Samples/winui/controls/common/vlistvw/a.exe?raw=true

-- 
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