Commit b1cc87cb656 ("msi: The line control has a height of exactly 2
device units.", 2007-12-16) open-coded the body of
(msi_)dialog_add_control() inside dialog_line_control() modulo the
height override.
Except the fixed height, line controls have nothing special compared to
other controls. Thus, there is little merit in open-coding it.
Also, dialog_line_control() has bit-rotted over time; it already missed
a few changes that were done to any other controls.
Fix this by just using dialog_add_control(). Also, add a special case
logic just for line controls.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3322
Today, CreateTextServices() sometimes triggers an assertion failure in
select_style().
When ME_MakeEditor() calls ME_MakeFirstParagraph(), the editor
(ME_TextEditor) is not in a fully initialized state. For example, the
font cache (pFontCache) is not fully initialized, which sometimes makes
select_style() believe that the cache slots are fully occupied.
Fix this by delaying the call to wrap_marked_paras_dc() until the editor
is fully initialized.
Also, delay the call to ITextHost::TxReleaseDC() until after
wrap_marked_paras_dc(), since we need the device context a bit longer.
Fixes: b70eb32c5f3e506181d9e1e9fbef62e9baf3674d
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3321
This MR fixes WRC9 crashing on start with builtin xinput, since the game uses UWP xinput the ordinal numbers don't match up, so I decided to put these new exports with `@ stdcall` instead
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3330
This is just a draft to receive feedback, I'm not sure how could I test this behavior, right now the test I wrote works but there are times where it doesn't enter into the deadlock.
Also I'm not sure if leaving the critical section before waiting for the streaming thread is the correct way to solve the problem.
--
v2: evr: Leave critical section before waiting for streaming thread.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3319
On Thu Jul 13 19:42:16 2023 +0000, Jinoh Kang wrote:
> This leads to a regression: NtContinue() can no longer properly restore
> X16 and X17, since they are now clobbered by `__wine_syscall_dispatcher_return`.
> The proper fix is at
> https://www.winehq.org/mailman3/hyperkitty/list/wine-devel@winehq.org/threa…,
> which is a superset of this patchset.
> I don't have an ARM64 build machine at the moment; can you rebase it and
> see if it works?
> Many thanks for your work!
Can verify that your patch works for me, apologies for missing this in my original MR
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3315#note_38932
This fixes SetWindowLongPtr on WoW64. On 32-bit, we have
```
#define SetWindowLongPtrA SetWindowLongA
#define SetWindowLongPtrW SetWindowLongW
```
meaning that on WoW64, all pointers passed would be padded with `0xffffffff` (because they are treated as LONG), and this is the cause of many of the failing WoW64 tests. This fixes that behavior. I'm not sure if this is the right place to fix it though.
--
v6: wow64win: Always use NtUserSetWindowLongPtr() for GWLP_HINSTANCE and GWLP_WNDPROC.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3294
On Thu Jul 13 18:07:29 2023 +0000, Gabriel Ivăncescu wrote:
> There's no need for a cast though. `ARRAY_SIZE` is already `size_t`
> (because it's implemented with `sizeof`), and a comparison between a
> signed integer and an unsigned integer with at least as many bits is
> always promoted to unsigned.
That is true. This thread can be dismissed then.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3301#note_38929
On Thu Jul 13 16:37:28 2023 +0000, Jeffrey Smith wrote:
> Compilers can (and at least some do) treat an enumeration as a _signed_
> integer. For the comparison to work as desired you'll want to cast
> `InformationClass` to an unsigned type. I think `size_t` would be appropriate.
There's no need for a cast though. `ARRAY_SIZE` is already `size_t` (because it's implemented with `sizeof`), and a comparison between a signed integer and an unsigned integer with at least as many bits is always promoted to unsigned.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3301#note_38928
Fall through in create_link and allow SHGetFolderPathAndSubDirW to
create an empty folder in place if the alternatives are not available.
Creating a link back to $HOME makes a recursive directory structure,
which results in crashes in programs that naively search %USERPROFILE%
(e.g. Quicken).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3325
Jeffrey Smith (@whydoubt) commented about dlls/advapi32/lsa.c:
> + "PolicyReplicaSourceInformation",
> + "PolicyDefaultQuotaInformation",
> + "PolicyModificationInformation",
> + "PolicyAuditFullSetInformation",
> + "PolicyAuditFullQueryInformation",
> + "PolicyDnsDomainInformation",
> + "PolicyDnsDomainInformationInt",
> + "PolicyLocalAccountDomainInformation",
> + "PolicyMachineAccountInformation",
> + "PolicyMachineAccountInformation2",
> + "PolicyLastEntry"
> +};
> +
> +static LPCSTR debugstr_InformationClass(IN POLICY_INFORMATION_CLASS InformationClass)
> +{
> + if (InformationClass >= ARRAY_SIZE(string_InformationClass))
Compilers can (and at least some do) treat an enumeration as a _signed_ integer. For the comparison to work as desired you'll want to cast `InformationClass` to an unsigned type. I think `size_t` would be appropriate.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3301#note_38926
In HttpSendRequestW and HttpSendRequestExW, if the header pointer is not
null but the length parameter is 0, the header length should be derived
from the string length instead.
In HttpSendRequestA and HttpSendRequestExA, on the same scenario, the
function should fail instead.
--
v5: wininet: Handle http headers correctly when length is 0
https://gitlab.winehq.org/wine/wine/-/merge_requests/3269
This fixes an issue I ran into in UI Automation using an interface proxy marshaled with `MSHCTX_INPROC`. `CoUnmarshalInterface` always passes `MSHCTX_LOCAL` when using the standard marshaler, regardless of what was passed to `CoMarshalInterface`.
When passing an interface that uses the free threaded marshaler as an argument to a method on the proxy retrieved from `CoUnmarshalInterface`, it passes `MSHCTX_LOCAL` when trying to marshal, which the results in the free threaded marshaler trying to create a proxy/stub which fails.
--
v3: combase: Use correct destination context in CoUnmarshalInterface when using the standard marshaler.
ole32/tests: Extend test_marshal_channel_buffer() test to include IRpcProxyBufferWrapper checks.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3198
Mainly promoting single object components to variables for SM 5.0's RDEF block and lowering combined samplers to separate sampler+texture objects for SM 4.
Following patches (including prepending uniform copies resource components within struct parameters) in:
https://gitlab.winehq.org/fcasas/vkd3d/-/commits/master6c
--
v5: vkd3d-shader/hlsl: Don't allocate all texture registers for synthetic separated samplers.
vkd3d-shader/hlsl: Lower combined samplers to separate sampler and texture objects for SM4.
vkd3d-shader/hlsl: Separate tracking of sampler_dim and usage for object components.
vkd3d-shader/hlsl: Introduce hlsl_new_synthetic_var_named().
vkd3d-shader/hlsl: Check is_uniform instead of HLSL_STORAGE_UNIFORM when validating object refs.
tests: Add lowering combined samplers tests.
vkd3d-shader/hlsl: Handle resource components individually for SM 5.0.
vkd3d-shader/tpf: Introduce struct extern_resource.
vkd3d-shader/hlsl: Allow derefs to provide the data_type.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/209
Sufficient for compiling a no-op pixel shader.
This should probably be rebased on top of !263 because it introduces vkd3d_spirv_get_type_id_for_data_type(), which 263 renders unnecessary.
!263 is not essential, but I think using two different type systems in the backend is not ideal.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/278
Jeffrey Smith (@whydoubt) commented about dlls/secur32/secur32.c:
> + "NameGivenName",
> + "NameSurname"
> +};
> +
> +static LPCSTR debugstr_NameFormat(IN EXTENDED_NAME_FORMAT NameFormat)
> +{
> + if (NameFormat >= sizeof(string_NameFormat)/sizeof(string_NameFormat[0]))
> + return "(unknown)";
> + return string_NameFormat[NameFormat];
> +}
> +
> BOOLEAN WINAPI GetUserNameExW(
> EXTENDED_NAME_FORMAT NameFormat, LPWSTR lpNameBuffer, PULONG nSize)
> {
> - TRACE("(%d %p %p)\n", NameFormat, lpNameBuffer, nSize);
> + TRACE("(%d %s %p %p)\n", NameFormat, debugstr_NameFormat(NameFormat), lpNameBuffer, nSize);
Written this way, it would make it appear that the function takes 4 parameters. I would suggest revising to make it clear that this is two representations of the same parameter.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3301#note_38855
Jeffrey Smith (@whydoubt) commented about dlls/secur32/secur32.c:
> }
>
> +static LPCSTR string_NameFormat[] =
> +{
> + "NameUnknown",
> + "NameFullyQualifiedDN",
> + "NameSamCompatible",
> + "NameDisplay",
> + "NameUniqueId",
> + "NameCanonical",
> + "NameUserPrincipal",
> + "NameCanonicalEx",
> + "NameServicePrincipal",
> + "NameDnsDomain",
> + "NameGivenName",
> + "NameSurname"
The values in the EXTENDED_NAME_FORMAT enumeration are not contiguous, so you need to fill in some gaps.
For instance, NameUniqueId is 6.
If passed in, this method would return "NameUserPrincipal".
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3301#note_38852
Validate user data before passing it to PolyDraw.
The program in the bug requests to draw figures outrageously outside the DC's region after presumably, some uninitialized values happen as a result of a missing font. Native gdiplus seems to handle this gracefully so we probably also should.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41617
Signed-off-by: David Kahurani <k.kahurani(a)gmail.com>
--
v3: gdiplus: Clip polygons before drawing them
https://gitlab.winehq.org/wine/wine/-/merge_requests/3288
Validate user data before passing it to PolyDraw.
The program in the bug requests to draw figures outrageously outside the DC's region after presumably, some uninitialized values happen as a result of a missing font. Native gdiplus seems to handle this gracefully so we probably also should.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41617
Signed-off-by: David Kahurani <k.kahurani(a)gmail.com>
--
v2: gdiplus: Clip polygons before drawing them
https://gitlab.winehq.org/wine/wine/-/merge_requests/3288
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54748
(I put this is draft, as there is something else in `test_image_properties` that should possibly be cleaned up first)
--
v2: gdiplus: Fix GdipGetAllPropertyItems return value when no properties exist.
gdiplus: Fix GdipGetPropertySize return value when no properties exist.
gdiplus/tests: Use test context for test ran in a loop.
gdiplus/tests: Add GIF to image properties tests
gdiplus/tests: Use consistent no-alternate-value for image properties
https://gitlab.winehq.org/wine/wine/-/merge_requests/3302
Windows 10 [received support](https://devblogs.microsoft.com/commandline/af_unix-comes-to-window… for AF_UNIX sockets in Insider Build 17063. This merge request adds basic support for AF_UNIX sockets to ws2_32 and wineserver.
Of particular note is the difficulty in handling `sun_path`. Most of the functions that allow for translating Windows paths to Unix paths are not accessible from ws2_32. I considered the following options:
* Pass the Windows path to wineserver and do the conversion there.
* This is, as far as I can tell, not possible without major rearchitecting. wineserver does not have functions to translate Windows paths to Unix paths, for obvious reasons.
* Obtain the current working directory of the requesting process and temporarily change directories to there.
* This only handles relative paths and fails for absolute paths, UNC paths, etc.
* Conditionally change directories based on whether the path is relative or not.
* This is error-prone and wineserver does not have the requisite functions to do this cleanly.
I ultimately decided to pass the translated Unix path to wineserver, which changes directories to `dirname(path)`. It then provides `bind` and `connect` with `basename(path)`. This is not threadsafe, but wineserver is not (currently) multithreaded.
Abstract sockets are supported by this patch.
--
v43: ws2_32/tests: Add test for AF_UNIX sockets fix.
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.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2786