The most important thing here is a workaround for an OS bug: rapidly hiding and showing the dock icon can result in multiple icons for the same app, and those icons will ignore NSApp.applicationIconImage. Making sure transitions happen no less than 0.5 seconds apart from one another seems to fix it.
Also, hiding a dock icon will deactivate an app. That's not desirable if it still has visible windows, so attempt to force a reactivation. That's often not successful on Sonoma due to the cooperative app activation heuristics, but it's the best we can do, and it should be a rare case.
Also, there is some logic in -transformProcessToForeground: that we often want to happen regardless of whether the app is getting a dock icon (e.g. App Nap and activation). So I've renamed that function to more accurately communicate what it does, and consolidate it with -tryToActivateIgnoringOtherApps:.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5604
The most important thing here is a workaround for an OS bug: rapidly hiding and showing the dock icon can result in multiple icons for the same app, and those icons will ignore NSApp.applicationIconImage. Making sure transitions happen no less than 1 second apart from one another seems to fix it. *Edit:* v2 update: 0.5 seconds is not always long enough. A good test case is the Notepad++ installer: after you select a language, it rapidly hides and shows some windows, and without a longer delay the icon will wind up with the default system terminal-looking icon. One second is probably overkill, but this ought to be a somewhat uncommon case.
Also, hiding a dock icon will deactivate an app. That's not desirable if it still has visible windows, so attempt to force a reactivation. That's often not successful on Sonoma due to the cooperative app activation heuristics, but it's the best we can do, and it should be a rare case.
Also, there is some logic in -transformProcessToForeground: that we often want to happen regardless of whether the app is getting a dock icon (e.g. App Nap and activation). So I've renamed that function to more accurately communicate what it does, and consolidate it with -tryToActivateIgnoringOtherApps:.
--
v2: winemac.drv: Consolidate foregrounding and dock icon behavior.
winemac.drv: Remove incorrect documentation for orderBelow: and rename a parameter.
winemac.drv: Reactivate the app if needed after hiding its dock icon.
winemac.drv: Enforce a delay between dock icon hides and shows.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5604
This is the first part of a longer series of commits that can be found here: https://gitlab.winehq.org/madewokherd/wine/-/tree/getdc-wip?ref_type=heads
The eventual goal is to no longer store gdi32 handles, which are a limited resource, on gdiplus objects, except when absolutely necessary. In particular, Graphics objects created from an HWND do not need to store an HDC (GetDC/ReleaseDC theoretically caches those and works just fine), and Bitmap objects with a gdi32-compatible format shouldn't store an HBITMAP or HDC. These changes revealed some other bugs in bitmap and linecap code, which I've also fixed in order to keep the tests working.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5593
This is the first serie of a major rewrite of cmd.exe's command engine
(lexer, parser, command handling).
The goal is to implement correctly:
- command chaining (&&, ||) operators,
- fix a number of issues (eg. 32679, 55401, 44063...)
- remove some spaghetti code from engine,
- allow to move forward on some pending MR (5246 5242 5194 4504...)
This first part mainly extends the tests with the issues
listed in above bug tickets & MR.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5592
This fixes crashes on Windows 7-10.
--
v2: rpcrt4/tests: Allocate stub buffers with NdrOleAllocate.
rpcrt4/tests: Test whether Ndr(Get|Free)Buffer calls StubMsg.pfn(Allocate|Free).
rpcrt4/tests: Correct a comment in test_pointer_marshal.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5117