These functions are used by Visual Studio 2019, when opening or converting some projects.
Signed-off-by: Lorenzo Ferrillo <lorenzofersteam(a)live.it>
--
v20: kernelbase:return pointer for counter instead of index. remove auxilliary function to set the value
https://gitlab.winehq.org/wine/wine/-/merge_requests/3799
Sending key events through `-[NSTextInputContext handleEvent:]`, as we do in `macdrv_send_text_input_event`, results in doubled characters for certain macOS input sources. The Romaji source does this reliably, as do certain third-party sources. (The built-in dictation does it as well, but we already blacklist that - !5660 - because it remains "active" even when it's not.)
I can't find this spelled out directly, but if you read between the lines, it seems clear that you're only supposed to send key *down* events to `-[NSTextInputContext handleEvent:]` and not key ups. Supporting evidence:
1. [The old documentation on the text system](https://developer.apple.com/library/archive/documentation/TextFonts… only mentions `handleEvent:` being called in the context of `-keyDown:`.
2. [The guide to implementing a custom text view/NSTextInputClient](https://developer.apple.com/library/archive/documen… only mentions overriding `-keyDown:` and sending those events to `-handleEvent:`.
3. [iTerm only sends key down events to `-handleEvent:`](https://github.com/gnachman/iTerm2/blob/6134ea0a9d9d0fee5e7d7704fc98efec1fc77c24/sources/iTermKeyboardHandler.m#L355). You have to unpack the logic a bit from there, but `-handleKeyDownEvent:...` is the only method that calls `-handleEventWithCocoa:inputContext:`, which is what (usually) calls `-handleEvent:` on the `inputContext`.
4. [The InputMethodKit method on the IMKServerInput protocol to handle NSEvents directly](https://developer.apple.com/documentation/objectivec/nsobject/138… only mentions getting key down events.
So presumably input source authors sometimes do not check the type of the NSEvent they're receiving and process all key events equally, be they downs or ups, which results in the doubled input.
This patch fixes the issues with Romaji and the problematic third-party method we've encountered.
--
v3: winemac.drv: Only send key down events to the window's inputContext.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7701
--
v2: amstream: Release the allocator used by the direct draw stream.
amstream: Implement dynamic formats in ddraw stream.
amstream/tests: Test for dynamic formats in ddraw stream.
amstream: Implement custom allocator for ddraw stream.
amstream/tests: Test for custom allocator in ddraw stream.
amstream: Implement IMemAllocator stub for ddraw stream.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7715
Follow-up of !2786, which appears to have been abandoned.
--
v12: ws2_32/tests: Add test for AF_UNIX sockets.
server: Fix getsockname() and accept() on AF_UNIX sockets.
server: Introduce error when attempting to create a SOCK_DGRAM AF_UNIX socket.
server: Allow for deletion of socket files.
ws2_32: Add support for AF_UNIX sockets.
ws2_32: Add afunix.h header.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7650
--
v3: win32u: Add a nulldrv pbuffer stub implementation.
winemac: Use the generic pbuffer implementation.
winewayland: Use the generic pbuffer implementation.
win32u: Introduce a generic pbuffer implementation from winex11.
opengl32/tests: Add more pbuffer tests.
win32u: Handle some pixel format initialization.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7758
--
v2: win32u: Add a nulldrv pbuffer stub implementation.
winemac: Use the generic pbuffer implementation.
winewayland: Use the generic pbuffer implementation.
win32u: Introduce a generic pbuffer implementation from winex11.
opengl32/tests: Add more pbuffer tests.
win32u: Handle some pixel format initialization.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7758
This MR enforces alignment of TLS slots as described in PE file.
--
v4: ntdll: Let layout of TLS vector be closer to native.
ntdll: Enforce the alignment of TLS directory entries.
kernel32: Add test for TLS memory layout.
kernel32/tests: Add a test about TLS slot alignment.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7251
The game "Marvel Heroes" uses AES for some session validation on login. It uses `CryptImportKey` to configure the key, but this fails in Wine (see for example the documentation of MHServerEmu: https://github.com/Crypto137/MHServerEmu/blob/f250fbd8d62a8d18afa6592e39058…) because it leaves garbage(?) data in the reserved field of the key blob header. This is ignored on Windows (tested on Windows 10, but seems to be the same on other Windows versions, since the game runs without problem), but Wine verifies this value and exits early. This removes the check and adds a barebones test to verify this behavior.
--
v2: rsaenh: Ignore reserved field in import_key
https://gitlab.winehq.org/wine/wine/-/merge_requests/7744