[Bug 57178] New: toolbar control doesn't forward WM_NOTIFY to it's original parent
https://bugs.winehq.org/show_bug.cgi?id=57178 Bug ID: 57178 Summary: toolbar control doesn't forward WM_NOTIFY to it's original parent Product: Wine Version: 9.16 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: comctl32 Assignee: wine-bugs(a)winehq.org Reporter: alanas.00(a)mail.ru Distribution: Debian Created attachment 77077 --> https://bugs.winehq.org/attachment.cgi?id=77077 foo2.c — test program, compile `x86_64-w64-mingw32-gcc-13 -std=c11 -Wall -Wextra -Wpedantic -Wno-unused-parameter -O3 -o foo2.exe foo2.c -lcomctl32` in windows xp professional x64 edition service pack 2 and windows 7 ultimate service pack 1 and maybe other windowses that I didn't test but not wine NMDDR nmhdr={ .hwndFrom=NULL, .idFrom=0xfedcba9876543210, .code=0xabc }; SendMessageA( toolbar, WM_NOTIFY, 0x4444444444444444, (LPARAM)nmhdr ); does something similar to NMDDR nmhdr={ .hwndFrom=NULL, .idFrom=0xfedcba9876543210, .code=0xabc }; SendMessageA( toolbar_original_parent, WM_NOTIFY, 0xfedcba9876543210, (LPARAM)nmhdr ); except if nmhdr.code is one of 0xfffffc4a, 0xfffffc4b, 0xfffffc4c, 0xfffffc4d, 0xfffffc4e, 0xfffffc4f, 0xfffffc50, 0xfffffc51, 0xfffffc52, 0xfffffc53, 0xfffffc54, 0xfffffc55, 0xfffffc56, 0xfffffc57, 0xfffffc58, 0xfffffc59, 0xfffffc5a, 0xfffffc5b, 0xfffffc5c, 0xfffffc5d, 0xfffffc5e, 0xfffffc5f, 0xfffffc60, 0xfffffc61, 0xfffffc62, 0xfffffc63, 0xfffffc64, 0xfffffc65, 0xfffffc66, 0xfffffc67, 0xfffffc68, 0xfffffc69, 0xfffffc6a, 0xfffffc6b, 0xfffffc6c, 0xfffffc6d, 0xfffffc6e, 0xfffffc6f, 0xfffffc70, 0xfffffc71, 0xfffffc72, 0xfffffc73, 0xfffffc74, 0xfffffc75, 0xfffffc76, 0xfffffc77, 0xfffffc78, 0xfffffc79, 0xfffffc7a, 0xfffffc7b, 0xfffffc7c, 0xfffffcd7, 0xfffffcda, 0xfffffdee nmhdr.hwndFrom is not accessed and can be inside PAGE_NOACCESS page except if nmhdr.code is one of 0xfffffcd7, 0xfffffcda (didn't test what happens if nmhdr.hwndFrom is readable) nmhdr.code gets overwritten if nhmdr.code is one of 0xfffffcd9, 0xfffffd17, 0xfffffd18, 0xfffffd19, 0xfffffd1a, 0xfffffd30, 0xfffffd31, 0xfffffe34, 0xfffffe35, 0xfffffe36, 0xfffffe37, 0xfffffe38, 0xfffffe39, 0xfffffe3a, 0xfffffe3b, 0xfffffe3c, 0xfffffe3d, 0xfffffe3e, 0xfffffe62, 0xfffffeb7, 0xfffffeb8, 0xfffffeb9, 0xfffffeba, 0xfffffebb, 0xfffffebd, 0xfffffebe, 0xfffffebf, 0xfffffec0, 0xffffff4d, 0xffffff4e, 0xffffff4f, 0xffffff50, 0xffffff51, 0xffffff5d, 0xffffff5f, 0xffffff62 (see foo2.txt) (toolbar_original_parent gets the message after overwriting nmhdr.code) note: 0xfedcba9876543210, 0xabc, 0x4444444444444444 are arbitrary garbage numbers note: foo2.c code is not very good because I didn't care about non-x64 windowses and first time using windows-specific api note: toolbar_original_parent is called h1 in foo2.c I think this bug is reason why pressing enter in 7-zip file manager path input doesn't work in wine and reactos ( https://old.reddit.com/r/winehq/comments/16ah3ze ) -- 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.
https://bugs.winehq.org/show_bug.cgi?id=57178 --- Comment #1 from alanas.00(a)mail.ru --- Created attachment 77078 --> https://bugs.winehq.org/attachment.cgi?id=77078 foo2.txt — foo2.exe output running in windows xp professional x64 edition service pack 2 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=57178 --- Comment #2 from alanas.00(a)mail.ru --- Created attachment 77079 --> https://bugs.winehq.org/attachment.cgi?id=77079 foo2.exe — compiled foo2.c -- 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.
https://bugs.winehq.org/show_bug.cgi?id=57178 --- Comment #3 from alanas.00(a)mail.ru --- Created attachment 77208 --> https://bugs.winehq.org/attachment.cgi?id=77208 fixing attempt 1 observations from windows 7 ultimate service pack 1 x64 (cheat engine didn't work in windows xp professional x64 edition service pack 2): • TB_SETPARENT message changes which window gets forwarded WM_NOTIFY • WM_NOTIFY message is forwarded using SendMessageW (even if original WM_NOTIFY message was sent using SendMessageA) -- 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.
https://bugs.winehq.org/show_bug.cgi?id=57178 alanas.00(a)mail.ru changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|toolbar control doesn't |toolbar control doesn't |forward WM_NOTIFY to it's |forward WM_NOTIFY to it's |original parent |original parent (affects | |7-fip file manager) Keywords| |download, patch -- 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.
https://bugs.winehq.org/show_bug.cgi?id=57178 alanas.00(a)mail.ru changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|toolbar control doesn't |toolbar control doesn't |forward WM_NOTIFY to it's |forward WM_NOTIFY to it's |original parent (affects |original parent (affects |7-fip file manager) |7-zip file manager) -- 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.
https://bugs.winehq.org/show_bug.cgi?id=57178 --- Comment #4 from alanas.00(a)mail.ru --- Created attachment 77320 --> https://bugs.winehq.org/attachment.cgi?id=77320 foo4.c — test program, compile `x86_64-w64-mingw32-gcc-12-win32 -std=c11 -Wall -Wextra -Wpedantic -O3 -o foo4.exe foo4.c -lcomctl32` memory after nmhdr.code gets accessed in windows xp professional x64 edition service pack 2 if nmhdr.code is one of 0xfffffc7a, 0xfffffc7b, 0xfffffcd9, 0xfffffd17, 0xfffffd18, 0xfffffd19, 0xfffffd1a, 0xfffffd30, 0xfffffd31, 0xfffffe34, 0xfffffe35, 0xfffffe36, 0xfffffe37, 0xfffffe38, 0xfffffe39, 0xfffffe3a, 0xfffffe3b, 0xfffffe3c, 0xfffffe3d, 0xfffffe3e, 0xfffffe62, 0xfffffeb7, 0xfffffeb8, 0xfffffeb9, 0xfffffeba, 0xfffffebb, 0xfffffebd, 0xfffffebe, 0xfffffebf, 0xfffffec0, 0xffffff4d, 0xffffff4e, 0xffffff4f, 0xffffff50, 0xffffff51, 0xffffff5d, 0xffffff5f, 0xffffff62 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=57178 --- Comment #5 from alanas.00(a)mail.ru --- I created merge request: https://gitlab.winehq.org/wine/wine/-/merge_requests/6737 didn't add extra nmhdr.code comparisons because I don't know what they do in windows and wine's toolbar already handles and doesn't forward 0xfffffc7a = PGN_CALCSIZE, 0xfffffc7b = PGN_SCROLL, 0xfffffdee = TTN_GETDISPINFOW also wine handles and doesn't forward 0xfffffdf8 = TTN_GETDISPINFOA: case TTN_GETDISPINFOA: FIXME("TTN_GETDISPINFOA - should not be received; please report\n"); return 0; which windows xp professional x64 edition service pack 2 and windows 7 ultimate service pack 1 just forward -- 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.
https://bugs.winehq.org/show_bug.cgi?id=57178 --- Comment #6 from alanas.00(a)mail.ru --- Created attachment 77351 --> https://bugs.winehq.org/attachment.cgi?id=77351 foo5.c — test program, compile `x86_64-w64-mingw32-gcc-12-win32 -std=c11 -Wall -Wextra -Wpedantic -O3 -o foo4.exe foo4.c -lcomctl32` foo5.c is similar to foo2.c but it only checks nmhdr->code in range [0xffff0000;0xffffffff] because I'm impatient and prints macro names in https://github.com/mingw-w64/mingw-w64/blob/e3a3dc588a6358bda826934d3adfeaa3... and https://github.com/mingw-w64/mingw-w64/blob/e3a3dc588a6358bda826934d3adfeaa3... near nmhdr->code numbers -- 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.
https://bugs.winehq.org/show_bug.cgi?id=57178 alanas.00(a)mail.ru changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77351|foo5.c — test program, |foo5.c — test program, description|compile |compile |`x86_64-w64-mingw32-gcc-12- |`x86_64-w64-mingw32-gcc-12- |win32 -std=c11 -Wall |win32 -std=c11 -Wall |-Wextra -Wpedantic -O3 -o |-Wextra -Wpedantic -O3 -o |foo4.exe foo4.c -lcomctl32` |foo5.exe foo5.c -lcomctl32` -- 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.
https://bugs.winehq.org/show_bug.cgi?id=57178 --- Comment #7 from alanas.00(a)mail.ru --- Created attachment 77352 --> https://bugs.winehq.org/attachment.cgi?id=77352 foo5.txt — foo5.exe output running in windows xp professional x64 edition service pack 2 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=57178 --- Comment #8 from alanas.00(a)mail.ru --- Created attachment 77361 --> https://bugs.winehq.org/attachment.cgi?id=77361 foo6.c — test program, compile `x86_64-w64-mingw32-gcc-12-win32 -std=c11 -Wall -Wextra -Wpedantic -O3 -o foo6.exe foo6.c -lcomctl32` foo6.c is similar to foo2.c but: • toolbar's original parent (h1) returns NFR_UNICODE for WM_NOTIFYFORMAT message • prints macro names in https://github.com/mingw-w64/mingw-w64/blob/e3a3dc588a6358bda826934d3adfeaa3... and https://github.com/mingw-w64/mingw-w64/blob/e3a3dc588a6358bda826934d3adfeaa3... near nmhdr->code numbers • no skipping nmhdr->code -- 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.
https://bugs.winehq.org/show_bug.cgi?id=57178 --- Comment #9 from alanas.00(a)mail.ru --- Created attachment 77363 --> https://bugs.winehq.org/attachment.cgi?id=77363 foo6.txt — foo6.exe output running in windows xp professional x64 edition service pack 2 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=57178 --- Comment #10 from alanas.00(a)mail.ru --- Created attachment 77364 --> https://bugs.winehq.org/attachment.cgi?id=77364 foo7.c — test program, compile `x86_64-w64-mingw32-gcc-12-win32 -std=c11 -Wall -Wextra -Wpedantic -O3 -o foo7.exe foo7.c -lcomctl32` foo7.c is similar to foo6.c but: • memory after nmhdr->code is PAGE_NOACCESS instead of nmhdr->hwndFrom • skip nmhdr->code=PGN_CALCSIZE and nmhdr->code=PGN_SCROLL -- 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.
https://bugs.winehq.org/show_bug.cgi?id=57178 --- Comment #11 from alanas.00(a)mail.ru --- Created attachment 77365 --> https://bugs.winehq.org/attachment.cgi?id=77365 foo7.txt — foo7.exe output running in windows xp professional x64 edition service pack 2 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=57178 --- Comment #12 from alanas.00(a)mail.ru --- Created attachment 77382 --> https://bugs.winehq.org/attachment.cgi?id=77382 foo5fixed.c — test program, compile `x86_64-w64-mingw32-gcc-12-win32 -std=c11 -Wall -Wextra -Wpedantic -O3 -o foo5fixed.exe foo5fixed.c -lcomctl32` foo5fixed.c is like foo5.c but has more macro names and overwrites nmhdr's second page with zeroes to clean up stuff written by comctl32.dll -- 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.
https://bugs.winehq.org/show_bug.cgi?id=57178 --- Comment #13 from alanas.00(a)mail.ru --- Created attachment 77383 --> https://bugs.winehq.org/attachment.cgi?id=77383 foo5fixed.txt — foo5fixed.exe output running in windows xp professional x64 edition service pack 2 -- 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.
http://bugs.winehq.org/show_bug.cgi?id=57178 Zhiyi Zhang <zzhang(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |zzhang(a)codeweavers.com Status|UNCONFIRMED |RESOLVED --- Comment #14 from Zhiyi Zhang <zzhang(a)codeweavers.com> --- Thanks, Alanas. Fixed by https://gitlab.winehq.org/wine/wine/-/merge_requests/6737. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=57178 Zhiyi Zhang <zzhang(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |4cfe82739bf1705682b8b452793 | |9c63c98c99e15 -- 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.
http://bugs.winehq.org/show_bug.cgi?id=57178 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #15 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 10.9. -- 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.
participants (1)
-
WineHQ Bugzilla