[0.4.7][NTGDI] Commit minimized Flip_Fix_9.patch
authorJoachim Henze <Joachim.Henze@reactos.org>
Tue, 22 Nov 2022 15:22:01 +0000 (16:22 +0100)
committerJoachim Henze <Joachim.Henze@reactos.org>
Tue, 22 Nov 2022 15:22:01 +0000 (16:22 +0100)
commit7b61a4ef41cf8cd3fd1b6e5a39008eb417dcc523
treea38e98672e536b552240954526c95bf599896e15
parent94564d591f5e7ba4d14a03b2c42a0c4488c136eb
[0.4.7][NTGDI] Commit minimized Flip_Fix_9.patch

flip_fix_9.patch fixes:
CORE-16984 " 'SPINA Thrulg' / 'SPINA Thyr' / 'Sim Thyr' have images flipped"
CORE-17194 "StretchDIBits test" isn't work correctly"
           "Output of 'Project 3 Test'"
CORE-14701 "DVDStyler 3.0.4 transparent toolbars"
CORE-14701 "DVDStyler 3.0.4 erroneously black around icons of welcome-dlg"
CORE-14671 "'Peazip' shows icons in buttons and menubar vertically flipped"
           "Double Commander shoes icons flipped in buttons, menubar, listview and the treeview"
CORE-13273 "Welcome to Lazarus" icon shows flipped
CORE-13026 "'CudaText app' icon shows flipped"
CORE-18653 The dibobj.c part also fixes a BSOD 0x1E nullptr deref in Win32K when running the setup of 'Auslogics Disk Defrag Pro 4.9.4.0' in releases/0.4.7 to releases/0.4.13

Not all of those are duplicates, although they appear to be at first glance.
It affects different controls and some of those tickets do have different 'guilty revs' than others.

The patch does consist of 2 parts:

1.) win32ss/gdi/ntgdi/dibobj.c
This one is the most clean part of it, that addresses most of the flipping issues now, and the BSOD 0x1E.

2.) The hack in comctl32.h redefining the version:
We used that in the past to appease some, but not all of the issues listed above.
But it does hide additional issues, e.g. in DvDStyler, therefore we seem to still need that appeasement even today.
Most likely it would make sense to aim to avoid this part in the future.
part 2.) was committed as first appeasement on its own already into
0.4.14-RC-24-g 198b61e
0.4.13-RC-7-g 67211fa
0.4.12-RC-5-g 8449527
0.4.11-RC-16-g b906163
0.4.10-RC-7-g f1e80fe
0.4.9-RC-34-g 9d758ae
Interestingly this part is not needed for releases/0.4.7.
It became necessary for all newer releases with the COMCTL32 Winesyncs during 0.4.8-dev' and 0.4.9-dev'ing and their massive button.c-changes.

We also created a summary of manual test-results:
https://jira.reactos.org/browse/CORE-17415?focusedCommentId=126668&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-126668

If you read this comment via git blame and your goal is to get rid of the hack in comctl32.h, I would highly recommend
to redo the tests of that testing table, and if that is asked too much, then please test at least the following cases:
CORE-14701 "DVDStyler 3.0.4 transparent toolbars"
CORE-14701 "DVDStyler 3.0.4 erroneously black around icons of welcome-dlg"
           "DVDStyler 3.0.4 erroneously black/transparent within comboboxes of properties of VMGM menu"
and try to add what might be needed to fix them, and double-check again:
           "DoubleCommander optionsDlg the most complex testcase, contains flip-prone icons in treeview, listview, menubar, buttons, statics". Only some of its flipped icons were impacted by the comctl32.h change before.

fix is a squashed pick from
0.4.15-dev-1603-g 232c45fcd71b12a0d726b47f4a72e9a16f87432a
0.4.15-dev-5396-g 9c5bb096bc21cee00a8b8968214d24d5c5500d88 [COMCTL32] partial revert of the upper commit
win32ss/gdi/ntgdi/dibobj.c