mirror of
https://github.com/reactos/reactos.git
synced 2026-09-09 02:44:55 +08:00
Fix desktop wallpaper painting behaviour for "Stretch", "Fit" and "Fill" displaying modes: - Create a new compatible bitmap to make user-defined wallpaper fit to the screen size. - Stretch user-defined wallpaper to this bitmap each time when wallpaper is set in Display Properties, to match the required screen coordinates. Don't do it on each desktop redrawing. - Use the system memory DC for stretching the wallpaper image and store it there first, instead of blit it to the destination (output) DC directly. - Use the same system memory DC for "Tile" and "Center" wallpaper modes too, to avoid unneeded allocating and freeing a new memory DC internally. Get rid from internally managed DC and use a global system memory DC to manage all wallpaper modes instead. - Move wallpaper coordinates calculation code into a separate function, because it's now used more than one time, both when blit to system memory DC on wallpaper changing and when actually repainting desktop. - Move wallpaper repainting code from IntPaintDesktop() into a separate function too, and call it from there. - Pass the previously calculated input and output coordinates (left, top, width and height) for an each displaying mode appropriately: "Tile", "Center", "Stretch", "Fit" and "Fill". - Then, simply blit a result to the output DC on each desktop repaint, to view the wallpaper contents on the desktop. "Tile" and "Center" modes remain unaffected, since they already have no any painting issues. CORE-13891, CORE-15820, CORE-15826