On Tue Aug 29 03:55:17 2023 +0000, Zhiyi Zhang wrote:
I think you need to look into why MoveWindow(infoPtr->Self, x, y, width, infoPtr->height, TRUE); doesn't actually repaint the window. I think it's the missing SWP_NOCOPYBITS for NtUserSetWindowPos() in NtUserMoveWindow(). But you need to test and see if that's actually the case. First, you test whether NtUserMoveWindow() calls NtUserSetWindowPos() with SWP_NOCOPYBITS by adding some message tests, e.g., is there a SWP_NOCOPYBITS in WM_WINDOWPOSCHANGING or not. You can search SWP_NOCOPYBITS in user32/tests/msg.c for examples. Depending on the result, if MoveWindow() needs to add SWP_NOCOPYBITS, then you fix MoveWindow(). If not, then adding an InvalidateRect(infoPtr->Self, NULL, FALSE); should be enough. A similar bug is https://bugs.winehq.org/show_bug.cgi?id=52515.
I also wonder if SWP_NOCOPYBITS is automatically added in certain cases. You can test moving the window to a new position, shrinking or expanding the size, and see what happens.