Window with WS_CHILD does not need to change Z order when SetWindowPos param hwndInsertAfter is HWND_TOPMOST or HWND_NOTOPMOST. Solve the problems mentioned in the previous patch, and Remove todo_wine on test_child_topmost_zorder.
v2: Add git log information v3: Move the path to fixup_flags function, only used to fix SetWindowPos function problem. v4: Divide a path into two pathes, better explain the prolem. and add notopmost verification v5: Add todo_wine to test patch[PATCH v5 1/2], and optimize fixup_flags[PATCH v5 2/2].
Signed-off-by: Jiajin Cui cuijiajin@uniontech.com
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=73860
Your paranoid android.
=== w1064v1809 (32 bit report) ===
user32: win.c:3221: Test failed: GetActiveWindow() = 00040074 win.c:3224: Test failed: GetFocus() = 00000000 win.c:3236: Test failed: GetFocus() = 00000000 win.c:3239: Test failed: GetFocus() = 00000000 win.c:3242: Test failed: GetFocus() = 00000000 win.c:3245: Test failed: GetActiveWindow() = 00040074 win.c:3249: Test failed: GetFocus() = 00000000 win.c:3252: Test failed: GetFocus() = 00000000 win.c:3946: Test failed: hwnd 0003004E/000D02D6 message 0737 win.c:3951: Test failed: hwnd 000D02D6/000D02D6 message 0202 win.c:3956: Test failed: hwnd 000D02D6/000D02D6 message 0203 win.c:3960: Test failed: message 0202 available
=== w1064v1809_2scr (32 bit report) ===
user32: win.c:3221: Test failed: GetActiveWindow() = 000301CA win.c:3224: Test failed: GetFocus() = 00000000 win.c:3236: Test failed: GetFocus() = 00000000 win.c:3239: Test failed: GetFocus() = 00000000 win.c:3242: Test failed: GetFocus() = 00000000 win.c:3245: Test failed: GetActiveWindow() = 000301CA win.c:3249: Test failed: GetFocus() = 00000000 win.c:3252: Test failed: GetFocus() = 00000000 win.c:3946: Test failed: hwnd 0004006E/000D02B4 message 0737 win.c:3951: Test failed: hwnd 000D02B4/000D02B4 message 0202 win.c:3956: Test failed: hwnd 000D02B4/000D02B4 message 0203 win.c:3960: Test failed: message 0202 available
=== w1064v1809_he (32 bit report) ===
user32: win.c:3781: Test failed: message 0738 available
=== w1064v1809_ja (32 bit report) ===
user32: win.c:3906: Test failed: hwnd 000202FE message 7fff win.c:3985: Test failed: hwnd 000202FE/00020362 message 7fff win.c:3988: Test failed: hwnd 000202FE/00020362 message 7fff
=== w1064v1809_zh_CN (32 bit report) ===
user32: win.c:3906: Test failed: hwnd 00010382 message 0282 win.c:3985: Test failed: hwnd 00010382/000403D6 message 0282 win.c:3988: Test failed: hwnd 00010382/000403D6 message 0282
=== w1064v1809 (64 bit report) ===
user32: win.c:3221: Test failed: GetActiveWindow() = 0000000000040296 win.c:3224: Test failed: GetFocus() = 0000000000000000 win.c:3236: Test failed: GetFocus() = 0000000000000000 win.c:3239: Test failed: GetFocus() = 0000000000000000 win.c:3242: Test failed: GetFocus() = 0000000000000000 win.c:3245: Test failed: GetActiveWindow() = 0000000000040296 win.c:3249: Test failed: GetFocus() = 0000000000000000 win.c:3252: Test failed: GetFocus() = 0000000000000000 win.c:3946: Test failed: hwnd 000000000003004E/00000000000E0178 message 0737 win.c:3951: Test failed: hwnd 00000000000E0178/00000000000E0178 message 0202 win.c:3956: Test failed: hwnd 00000000000E0178/00000000000E0178 message 0203 win.c:3960: Test failed: message 0202 available
=== debiant (32 bit report) ===
user32: combo.c:698: Test failed: 00000002: got 00000080 combo.c:704: Test failed: 00000002: got 00000080 combo.c:698: Test failed: 00000003: got 00000080 combo.c:704: Test failed: 00000003: got 00000080
=== debiant (32 bit Chinese:China report) ===
user32: combo.c:698: Test failed: 00000002: got 00000080 combo.c:704: Test failed: 00000002: got 00000080 combo.c:698: Test failed: 00000003: got 00000080 combo.c:704: Test failed: 00000003: got 00000080
=== debiant (32 bit WoW report) ===
user32: combo.c:698: Test failed: 00000002: got 00000080 combo.c:704: Test failed: 00000002: got 00000080 combo.c:698: Test failed: 00000003: got 00000080 combo.c:704: Test failed: 00000003: got 00000080
=== debiant (64 bit WoW report) ===
user32: combo.c:698: Test failed: 00000002: got 00000080 combo.c:704: Test failed: 00000002: got 00000080 combo.c:698: Test failed: 00000003: got 00000080 combo.c:704: Test failed: 00000003: got 00000080
Hello Jiajin,
On 6/22/20 5:03 AM, Jiajin Cui wrote:
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index b92a20df18..da07b18282 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -1998,12 +1998,13 @@ static BOOL fixup_flags( WINDOWPOS *winpos, const RECT *old_window_rect, int par } else if (winpos->hwndInsertAfter == HWND_TOPMOST) {
if ((wndPtr->dwExStyle & WS_EX_TOPMOST) && GetWindow(winpos->hwnd, GW_HWNDFIRST) == winpos->hwnd)
if (((wndPtr->dwExStyle & WS_EX_TOPMOST) && GetWindow(winpos->hwnd, GW_HWNDFIRST) == winpos->hwnd) ||
} else if (winpos->hwndInsertAfter == HWND_NOTOPMOST) {((wndPtr->dwStyle & (WS_CHILD | WS_POPUP)) == WS_CHILD)) winpos->flags |= SWP_NOZORDER;
if (!(wndPtr->dwExStyle & WS_EX_TOPMOST))
} elseif (!(wndPtr->dwExStyle & WS_EX_TOPMOST) || ((wndPtr->dwStyle & (WS_CHILD | WS_POPUP)) == WS_CHILD)) winpos->flags |= SWP_NOZORDER;
While this does address my concern regarding HWND_NOTOPMOST, it still doesn't address the other concerns I brought up in [1]. In particular:
* Does SetWindowPos() even succeed? I.e. I think it would be a good idea to test its return value.
* The fixed up flags are passed to WM_WINDOWPOSCHANGED. We have a good framework in msg.c that will make it easy to test which flags are passed to WM_WINDOWPOSCHANGED. Assuming that SetWindowPos() does succeed, I would recommend adding a test in msg.c to ensure that removing SWP_NOZORDER is correct.
[1] https://www.winehq.org/pipermail/wine-devel/2020-June/167321.html
On 6/22/20 6:22 AM, Marvin wrote:
=== debiant (32 bit report) ===
user32: combo.c:698: Test failed: 00000002: got 00000080 combo.c:704: Test failed: 00000002: got 00000080 combo.c:698: Test failed: 00000003: got 00000080 combo.c:704: Test failed: 00000003: got 00000080
It seems this error is caused by this patch (the others are probably spurious, but this one is not; I verified locally). You'll need to fix it (possibly with another patch) before this patch can be accepted.