[0.4.13] Anti-flicker backport winpos.c

This effective one-liner-backport fixes flickering in some apps like:
- CORE-7652 Hyperlink Blinking text while installing vc2008 redist package
and many duplicate-tickets of that same symptom, like:
- CORE-18553 CPUID CPU-Z 1.84 "about" flickers
- CORE-7753 Caesar 3: Autorun.exe flickers endlessly
- CORE-10741 API monitor high CPU usage
- CORE-15300 Worksoft Navigator 0.985 installer is locked in an endless redrawing loop
- CORE-16325 Some of MWSnap's installation windows fail to display content
- CORE-17925 MS Visual C++ 2008 Redistributable Setup takes long time
- CORE-18153 BitComet 1.86 forces the shell to a endless redrawing
- CORE-18434 Ubisoft installers (SetupUbi) - continously refresh of window
- CORE-15546 Shed 1.0 from rapps - setup does not draw some dlgs initially, but redraw can be enforced
- CORE-18582 Emule 0.50a - Interface frozen / flickering until window is moved

And since I do also port back the follow-up-commit of that, we can achieve that without introducing
the following regressions which the initial fixes caused:
- CORE-18817 [NTUSER] Winpos.c modification generates bad first drawing of some elements
- CORE-18830 Explorer Drawing glitch: Missing "X" on "Folder" pane when Right Click > Explore from Desktop icons
Those 2 things did not happen in the older releases beforehand.

In sum this is a squashed backport of:
0.4.15-dev-6507-g 49dbc8fbbb [NTUSER] Whitespace-fixes winpos.c
0.4.15-dev-5684-g 57eb2a6bf4 [NTUSER] Missing "X" on "Folder" pane when Right Click > Explore from Desktop icons & Rapps toolbar errors (#5068) CORE-18830, CORE-18817
the superseded 0.4.15-dev-5618-g 8866b9d7b0 Update win32ss/user/ntuser/winpos.c
the superseded 0.4.15-dev-5617-g 7866eb2886 [NTUSER] Fix winpos bug hyperlink&images loop redrawing CORE-7652 (#4995)

To prevent increased binary size for the added conditions in the code in older branches, strip a single good-path-TRACE()
which had no trailing \n in the older branches,
but where that \n was added in master head meanwhile. So that TRACE was a diff to older branches anyway.
This commit is contained in:
Joachim Henze 2023-08-20 02:49:06 +02:00
parent e39a612688
commit 29ffdb8715

View file

@ -2,7 +2,6 @@
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: Windows
* FILE: win32ss/user/ntuser/winpos.c
* PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
*/
@ -1747,8 +1746,6 @@ co_WinPosSetWindowPos(
ASSERT_REFS_CO(Window);
TRACE("pwnd %p, after %p, %d,%d (%dx%d), flags 0x%x",
Window, WndInsertAfter, x, y, cx, cy, flags);
#if DBG
dump_winpos_flags(flags);
#endif
@ -1948,7 +1945,7 @@ co_WinPosSetWindowPos(
Window->state |= WNDS_SENDNCPAINT;
}
if (!(WinPos.flags & SWP_NOREDRAW))
if (!(WinPos.flags & SWP_NOREDRAW) && ((WinPos.flags & SWP_AGG_STATUSFLAGS) != SWP_AGG_NOPOSCHANGE))
{
/* Determine the new visible region */
VisAfter = VIS_ComputeVisibleRegion(Window, FALSE, FALSE,