https://bugs.winehq.org/show_bug.cgi?id=43465
Bug ID: 43465 Summary: Unit Test: ComboBox Dropdown does not work if Style is set and no scrollbar required Product: Wine Version: 2.13 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: Brad.Wine1@amaitis.com Distribution: ---
Created attachment 58840 --> https://bugs.winehq.org/attachment.cgi?id=58840 Image of Visual bug
winehq-devel
wine --version wine-2.13
Combox works without the style loaded. After Style is loaded The dropdown box is blank and not selectable. works if scroll bar is required and the dropdown count >5.
source code is available download unit test
http://www.ateksol.com/dev/unittest/CreateComboBox.exe sha1sum bc58c1ec276cdf492133b5005690040ce7f3bfad CreateComboBox.exe
I put unknown in Component because we have tried native comctl32,comdlg32,advapi32,uxtheme,msimg32,MSCTF
I set the priority a Normal however for our release of the product it is Blocker.
Attached is an image of the symptom.
If it helps the above referenced program has a button to create and drop down a new box.
The CreateCombo button Sleeps for 10 seconds to allow time to start trace Creates the compontent drops it down and sleeps for 5 seconds to stop the trace.
https://bugs.winehq.org/show_bug.cgi?id=43465
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #1 from Fabian Maurer dark.shadow4@web.de --- Interesting. Could you maybe provide sourcecode for that sample?
https://bugs.winehq.org/show_bug.cgi?id=43465
--- Comment #2 from Brad Brad.Wine1@amaitis.com --- Created attachment 58841 --> https://bugs.winehq.org/attachment.cgi?id=58841 Delphi 10 source for unit test
Added attachment for project source. We have never submitted a bug to Wine before let us know if we missed anything required. And please guide us thru the status change and testing process.
https://bugs.winehq.org/show_bug.cgi?id=43465
--- Comment #3 from Fabian Maurer dark.shadow4@web.de --- Just a small collection of what I found so far.
Issue seems to start at
scroll.c:1980
SetWindowPos( hwnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED | SWP_SHOWWINDOW );
This calls
winpos.c:1897
wvrFlags = SendMessageW( pWinpos->hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms );
*pNewClientRect = params.rgrc[0];
After that pNewClientRect is (left: 1, top: 1, bottom: -1, right -17) leading to those problems. However, these values are not set in wine, but in native code, at least as far as I could tell.
Following hack gets it to work partially:
wvrFlags = SendMessageW( pWinpos->hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms ); if(params.rgrc[0].right < 0) return 0; *pNewClientRect = params.rgrc[0];
https://bugs.winehq.org/show_bug.cgi?id=43465
--- Comment #4 from Brad Brad.Wine1@amaitis.com --- When do you send that message? After creation, on drop down or after it drops down? So we can try this.
https://bugs.winehq.org/show_bug.cgi?id=43465
--- Comment #5 from Brad Brad.Wine1@amaitis.com --- After re reading this is in the winpos.c code. Sorry for my confusion. We can try sending an message after drop down to redraw with new parameters. Or should we try and compile source with change you proposed?
https://bugs.winehq.org/show_bug.cgi?id=43465
--- Comment #6 from Fabian Maurer dark.shadow4@web.de --- This is not a working solution yet, I just try to narrow down the error.
I'm not too experienced with the wine code, I guess it would be helpful to know what the program is doing, but this looks like Delphi classes where the source is not available.
Since I don't have Delphi, could you possible provide a sample with multiple comboboxes with different numbers of items? I still don't understand how the problem changes if a scrollbar is needed. Like, when there are enough items in the combobox for the scrollbar to display.
https://bugs.winehq.org/show_bug.cgi?id=43465
--- Comment #7 from Brad Brad.Wine1@amaitis.com --- Updated Unit test program
http://www.ateksol.com/dev/unittest/CreateComboBox.exe sha1sum CreateComboBox.exe 3e103ce0d233d8b683ab9473067a96db67056c54 CreateComboBox.exe
https://bugs.winehq.org/show_bug.cgi?id=43465
--- Comment #8 from Fabian Maurer dark.shadow4@web.de --- Created attachment 58850 --> https://bugs.winehq.org/attachment.cgi?id=58850 Test patch
Thanks for the quick update.
A few more notes: The program seems to be very strict on dropdown-listview size when calculating a new size, a slight deviation and the numbers are junk.
My current solution is to just enable/disable the scrollbar right before showing the dropdown list. Really not sure if this is the right solution, but it works for now... Attached it if you want to check it out.
https://bugs.winehq.org/show_bug.cgi?id=43465
--- Comment #9 from Brad Brad.Wine1@amaitis.com --- Thanks we will setup a wine source dev environment and try it.
https://bugs.winehq.org/show_bug.cgi?id=43465
--- Comment #10 from Fabian Maurer dark.shadow4@web.de --- Do you know how to reproduce the issue using the winapi alone, aka without delphi?
https://bugs.winehq.org/show_bug.cgi?id=43465
--- Comment #11 from Brad Brad.Wine1@amaitis.com --- We will look into reproducing in C++ with native API calls.
The patch you provided worked for then application version we are releasing. We had to apply it to 2.0.2. The development and staging release 2.14 we tried introduced what we believe is a change of focus bug related to the dropdown on the inplace editor with or without the patch.
Thanks for your help it was very appreciated the help in meeting our development schedule. The 2.0.2 patched we are testing does not have any drop down issues. The only issue is the right click styling does not remove the highlight when mouse moves to new menu item.
https://bugs.winehq.org/show_bug.cgi?id=43465
--- Comment #12 from Fabian Maurer dark.shadow4@web.de ---
We will look into reproducing in C++ with native API calls.
Thanks. It's a lot harder to reproduce when I don't have the code that causes the problem. Sadly delphi doesn't have the source available, at least not for me.
The patch you provided worked for then application version we are releasing. We had to apply it to 2.0.2. The development and staging release 2.14 we tried introduced what we believe is a change of focus bug related to the dropdown on the inplace editor with or without the patch.
A new issue? Did you already report that? If it's a regression it should be easier to track down.
Thanks for your help it was very appreciated the help in meeting our development schedule. The 2.0.2 patched we are testing does not have any drop down issues.
No problem, but keep in mind that it's mostly just a workaround, and probably not an actual solution. I'm not sure yet though, because I don't quite understand why the delphi-code behaves the way it does.
The only issue is the right click styling does not remove the highlight when mouse moves to new menu item.
I don't quite understand, mind to elaborate?
https://bugs.winehq.org/show_bug.cgi?id=43465
--- Comment #13 from Brad Brad.Wine1@amaitis.com --- Still working on getting an example of this bug in C++ native API calls. We don't have any C++ projects that use styles to pull from.
Added bug to demonstrate the problems I was describing. Hard to explain with an example for you to see. Bug 43576 Bug 43577
http://www.ateksol.com/dev/unittest/GridDropDown.exe sha1sum cea42ec431f985a802203be10e4cae6abe6afde5 GridDropDown.exe
http://www.ateksol.com/dev/unittest/MenuStyle.exe sha1sum b08eb7ad7fb0ea9164071b53dcacd117390d0913 MenuStyle.exe
https://bugs.winehq.org/show_bug.cgi?id=43465
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #58850|0 |1 is obsolete| |
--- Comment #14 from Fabian Maurer dark.shadow4@web.de --- Created attachment 59068 --> https://bugs.winehq.org/attachment.cgi?id=59068 Updated hack
Small update, a patch that helps bring this issue forward just got accepted: https://source.winehq.org/git/wine.git/commit/f7f7b89e2e9117811c91269643868c...
Referring to your updated test program from #Comment 7 here: The two bottom examples "3,6" and "5,6" now work. The top combobox "6,3" is still wrong though.
Attached an updated hack for the current git tree, or wine-2.16 and up. Code is now simpler, still looks like an workaround though. I'll look into it when I have time.
https://bugs.winehq.org/show_bug.cgi?id=43465
--- Comment #15 from Fabian Maurer dark.shadow4@web.de --- I sent in a different patch to address this issue: https://source.winehq.org/patches/data/138494 It's quite different to my hack, it should be a way better approach of handling things. Please retest if you have time, and if it doesn't fix all problems, just tell me.
https://bugs.winehq.org/show_bug.cgi?id=43465
--- Comment #16 from Brad Brad.Wine1@amaitis.com --- I applied the new patch to 2.14 and the combo dropdowns work.
I noticed you change the listbox code. There is a case when a popup listbox is styled the scrollbar stops working. I submited a bug to reproduce. Bug 44012
If you would like to look at while you are looking at the list box code.
Again thanks for your help.
https://bugs.winehq.org/show_bug.cgi?id=43465
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW
--- Comment #17 from Fabian Maurer dark.shadow4@web.de --- Revisiting. Still present in wine 3.14. I'm working on a new patchset though, should be ready the coming days.
https://bugs.winehq.org/show_bug.cgi?id=43465
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |2ac268436b535ed35c82aa2d5c2 | |518e5dfb3cd12 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #18 from Fabian Maurer dark.shadow4@web.de --- Fixed by https://source.winehq.org/git/wine.git/commit/2ac268436b535ed35c82aa2d5c2518...
https://bugs.winehq.org/show_bug.cgi?id=43465
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |user32
https://bugs.winehq.org/show_bug.cgi?id=43465
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #19 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.3.