This is more code refactoring than micro-optimization. Modern compilers may skip optimizations in some places, so we strictly make it clear to them that we need common variable to determine const result strlen() function.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7143
On Tue Jan 14 07:51:31 2025 +0000, Jacek Caban wrote:
> Sorry for the delay, I'm not sure what to think about it. If it's
> dropped in modern Windows, it's not clear if we want it. I guess it
> wouldn't hurt...
> We usually add SVGs so that maintainer mode can generate binary blobs.
> It seems that Tango theme repo contains SVGs, could we use them?
Hi Jacek, thanks for the review. When I wrote this patch, I considered combining the Tango SVGs into a single SVG file that would be converted to a PNG when building in Wine maintainer mode, but it turned out to be more trouble than it was worth. It's trivial to combine PNG files with ImageMagick, whereas combining SVG files requires a lot of manual effort. Moreover, no one cares about modifying these icons or has made an argument for why different icons would be better than the Tango defaults. And if in the future someone decides to import the SVGs into Wine, the resulting PNG will still have to be regenerated and replaced in the Git repository; we have to have a PNG in Git regardless of how it is created.
It seems to me that we either need to merge a patch like the one I am proposing, or we need to close [Bug 40236](https://bugs.winehq.org/show_bug.cgi?id=40236) as WONTFIX and remove the [patches in Wine Staging](https://github.com/wine-staging/wine-staging/tree/master/patches/s…. The most important thing is just to make a decision.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4174#note_91975
Since we're checking the child window clipping rules it is possible
that a toplevel window also has an onscreen client window, for instance
if the window wasn't created with WS_CLIPCHILDREN. The last window to
present between the parent and its children should be visible.
GDI blits always happen over the toplevel window, and we need to use
IncludeInferiors to make sure it goes through any onscreen client window
that is otherwise hiding the toplevel pixels.
It should be safe to use that flag wrt other child windows, as we also
set the clipping region to exclude the area that should be obscured by
any sibling.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57661
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7141