On Wed Mar 25 13:49:09 2026 +0000, Zhao Yi wrote:
But I think this has little to do with the bug. We cannot confirm whether hdc_dst is consistent with hdc_src when hdc_src is the window's own DC. So I think the solution here is to introduce a temporary DC to store hdc_src when hdc_src is the window's own DC. This is unrelated to hdc_dst, I only meant to ask what happens visually when hdc_src is a DC of the window itself. After a quick test it seems that, this for instance doesn't modify or shift the window contents at all:
``` pos.x = 10; pos.y = 10; hdc = GetDC( hwnd ); UpdateLayeredWindow( hwnd, NULL, NULL, NULL, hdc, &pos, 0, &blend, ULW_ALPHA ); ReleaseDC( hwnd, hdc ); ``` If that's true, we can make things simpler by simply ignoring surface content updates when hdc is the window DC. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10324#note_134644