On Wed May 15 15:19:50 2024 +0000, eric pouech wrote:
> to go one step further native also unmangles without whining something
> like `"?AU?$my_iter@H$0A@$$VJ@@"` into `struct my_iter<int,0,long>`
> (which doesn't make any sense in a C++ way either)
> so it looks like the $$V sequence is just a marker for the end of a
> variadic template, that is unmangled into nothing, and doesn't seem to
> have (at least the ucrtbase version I've used) other visible action
> so the attached patch should be enough
> [err](/uploads/977e89694bc0fcda26a3ba0f1ccb46b7/err)
This marker is specific to templates so it doesn't really belong to `demangle_datatype` function. The patch you have proposed e.g. incorrectly demangles `??__K_l@@YA?AUCC@@I$$VI@Z`.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5646#note_70553
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:.
--
v3: 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.
winemac.drv: Factor menu creation out of transformProcessToForeground:.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5604
On Wed May 15 13:11:30 2024 +0000, Piotr Caban wrote:
> I forgot to mention that native accepts multiple $$V sequences, so e.g.
> `?AU?$my_iter@H$0A@$$V$$V@@` is also parsed (but probably doesn't make
> sense and nothing is mangled this way).
to go one step further native also unmangles without whining something like `"?AU?$my_iter@H$0A@$$VJ@@"` into `struct my_iter<int,0,long>`
(which doesn't make any sense in a C++ way either)
so it looks like the $$V sequence is just a marker for the end of a variadic template, that is unmangled into nothing, and doesn't seem to have (at least the ucrtbase version I've used) other visible action
so the attached patch should be enough
[err](/uploads/977e89694bc0fcda26a3ba0f1ccb46b7/err)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5646#note_70538