Revert "server: Don't invalidate the newly exposed child region on the parent if it doesn't clip children."
This reverts commit 33617af8145b6fadfe41d48968a728ff57b3064b.
Apparently, the aforementioned commit might cause the expose region to be incorrectly computed when a window transitions from invisible state to visible state.
The commit also had caused regression in the following apps:
- Wine regedit.exe (bug 54268) - Dn-FamiTracker (bug 52903) - Unity Assets Bundle Extractor (same cause behind bug 52903)
It appears that the commit catalyzes discovery of hidden bugs in Wine's window repaint logic. It's also possible that the algorithm for computing the expose region is incomplete.
For these reasons, revert this commit for now.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54268 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52903
-- v2: Revert "server: Don't invalidate the newly exposed child region on the parent if it doesn't clip children."
From: Jinoh Kang jinoh.kang.kr@gmail.com
This reverts commit 33617af8145b6fadfe41d48968a728ff57b3064b.
Apparently, the aforementioned commit might cause the expose region to be incorrectly computed when a window transitions from invisible state to visible state.
The commit also had caused regression in the following apps:
- Wine regedit.exe (bug 54268) - Dn-FamiTracker (bug 52903) - Unity Assets Bundle Extractor (same cause behind bug 52903)
It appears that the commit catalyzes discovery of hidden bugs in Wine's window repaint logic. It's also possible that the algorithm for computing the expose region is incomplete.
For these reasons, revert this commit for now.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54268 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52903 --- dlls/comctl32/tests/edit.c | 2 +- dlls/user32/tests/msg.c | 4 ++++ server/window.c | 6 ++++-- 3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/tests/edit.c b/dlls/comctl32/tests/edit.c index f45b898dc12..a44f48022cf 100644 --- a/dlls/comctl32/tests/edit.c +++ b/dlls/comctl32/tests/edit.c @@ -3548,7 +3548,7 @@ static void test_change_focus(void) flush_sequences(sequences, NUM_MSG_SEQUENCES); SetFocus(hwnd); while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); - ok_sequence(sequences, COMBINED_SEQ_INDEX, setfocus_combined_seq, "Set focus", FALSE); + ok_sequence(sequences, COMBINED_SEQ_INDEX, setfocus_combined_seq, "Set focus", TRUE);
flush_sequences(sequences, NUM_MSG_SEQUENCES); SetFocus(parent_wnd); diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 6faaa2c2f40..8813e56fb8f 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -9317,6 +9317,8 @@ static void subtest_swp_paint_regions_( int line, int wrap_toplevel, LPCSTR pare } else { + todo_wine_if( !EqualRect( &rect_old, &rect_new ) && + (extest->style & WS_CLIPCHILDREN) == 0 && !is_composited ) ok( !!rgn_ok, "Parent update region shall match expected region\n" ); }
@@ -9378,6 +9380,8 @@ static void subtest_swp_paint_regions_( int line, int wrap_toplevel, LPCSTR pare } else { + todo_wine_if( !EqualRect( &rect_old, &rect_new ) && + (extest->style & WS_CLIPCHILDREN) == 0 && !is_composited ) ok( !!rgn_ok, "Child update region shall match expected region\n" ); }
diff --git a/server/window.c b/server/window.c index f713ed224aa..5dbe1cd1eb2 100644 --- a/server/window.c +++ b/server/window.c @@ -1766,8 +1766,10 @@ static struct region *expose_window( struct window *win, const rectangle_t *old_ offset_region( new_vis_rgn, win->window_rect.left - old_window_rect->left, win->window_rect.top - old_window_rect->top );
- if (is_composited ? union_region( new_vis_rgn, old_vis_rgn, new_vis_rgn ) - : subtract_region( new_vis_rgn, old_vis_rgn, new_vis_rgn )) + if (is_composited ? union_region( new_vis_rgn, old_vis_rgn, new_vis_rgn ) : + (win->parent->style & WS_CLIPCHILDREN) ? + subtract_region( new_vis_rgn, old_vis_rgn, new_vis_rgn ) : + xor_region( new_vis_rgn, old_vis_rgn, new_vis_rgn )) { if (!is_region_empty( new_vis_rgn )) {
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=130337
Your paranoid android.
=== debian11 (32 bit report) ===
comctl32: edit.c:3551: Test succeeded inside todo block: Set focus: marked "todo_wine" but succeeds
=== debian11 (32 bit ar:MA report) ===
comctl32: edit.c:3551: Test succeeded inside todo block: Set focus: marked "todo_wine" but succeeds
=== debian11 (32 bit de report) ===
comctl32: edit.c:3551: Test succeeded inside todo block: Set focus: marked "todo_wine" but succeeds
=== debian11 (32 bit fr report) ===
comctl32: edit.c:3551: Test succeeded inside todo block: Set focus: marked "todo_wine" but succeeds
=== debian11 (32 bit he:IL report) ===
comctl32: edit.c:3551: Test succeeded inside todo block: Set focus: marked "todo_wine" but succeeds
=== debian11 (32 bit hi:IN report) ===
comctl32: edit.c:3551: Test succeeded inside todo block: Set focus: marked "todo_wine" but succeeds
=== debian11 (32 bit ja:JP report) ===
comctl32: edit.c:3551: Test succeeded inside todo block: Set focus: marked "todo_wine" but succeeds
=== debian11 (32 bit zh:CN report) ===
comctl32: edit.c:3551: Test succeeded inside todo block: Set focus: marked "todo_wine" but succeeds
=== debian11b (32 bit WoW report) ===
comctl32: edit.c:3551: Test succeeded inside todo block: Set focus: marked "todo_wine" but succeeds
=== debian11b (64 bit WoW report) ===
comctl32: edit.c:3551: Test succeeded inside todo block: Set focus: marked "todo_wine" but succeeds