This fixes a crash with .NET application running with such locales, for example en-DE. The crash happens early in initialization, due to failure to return preferred UI language, which happens because there is no LCID -> locale name conversion for custom locales. It doesn't affect just preferred language, but also system default language, and other derived values.
--
v2: ntdll: Do not set system locales that resolve to custom-unspecified.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1417
This fixes a crash with .NET application running with such locales, for example en-DE. The crash happens early in initialization, due to failure to return preferred UI language, which happens because there is no LCID -> locale name conversion for custom locales. It doesn't affect just preferred language, but also system default language, and other derived values.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1417
This implements some events related to document/window load and unload / visibility changes. The latter is related in that native partially implements it, and only sends it when it is minimized or restored from being minimized, not on navigation or anything else.
The main issue for me is the visibilitychange patch. Since we don't control the container hwnd, and it can even be in another process, there is no way to be notified cleanly when it changes its minimization state. We can't subclass it either, as the tests show, it's not subclassed.
I implemented it now using an internal timer that polls for that, since it was the least invasive and works in all cases, including other process hwnd. Hooks wouldn't be able to do that, and are also more invasive IMO. I'm hoping for better ideas, though.
--
v3: mshtml: Implement pagehide event.
mshtml: Implement unload event.
mshtml: Implement pageshow event.
mshtml: Add visibilitychange event stub.
mshtml: Dispatch Gecko events to the window if there's no node.
mshtml: Do not register Gecko load event handler twice.
mshtml: Allow EVENT_BIND_TO_TARGET to bind to the window.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1373
Currently it's not obvious when the HLSL compiler fails, either due to a missing
feature or incorrectly coded error check, which can unnecessarily complicate
debugging.
It's legal for well-behaved programs to try to compile invalid shaders, but that
should be a rare enough case that it's worth printing it to Wine debug output
regardless.
--
v2: d3dcompiler: Print message output with ERR() in D3DPreprocess().
d3dcompiler: Print message output with ERR() in D3DCompile2().
https://gitlab.winehq.org/wine/wine/-/merge_requests/1340
This series improves Wine's support for delete-on-close flag and
delete disposition information on files:
- adapts tests for Windows 10
- extend and fix some tests
- implement some missing features in ntdll & server
--
v4: ntdll: Extend file tests about delete-on-close and disposition.
ntdll: Fix share mode for some delete-on-close/delete disposition tests.
ntdll: Adapt file tests on delete-on-close / delete disposition to Windows 10.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1231
--
v4: ntdll: Inline __wine_unix_call_fast in the dispatcher.
winecrt0: Inline PE __wine_unix_call(_fast) function calls.
ntdll: Avoid double indirection to get syscall_frame pointer.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1324
Atomic ops on images with Unknown type will cause SPIR-V validation failure,
and assertion failure in Mesa debug builds. D3D12 allows atomics on typed
buffers, and this requires a distinction to be made between UAV reads and
atomic ops.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/49
Just a few miscellaneous fixes I think are simple enough to make it into the next version.
--
v3: vkd3d-shader/hlsl: Revert expr_compatible_data_types() args names to "t1" and "t2".
vkd3d-shader/hlsl: Don't produce a parse error on empty buffer_body.
vkd3d-shader/hlsl: Check for non-static object references on resource stores.
tests: Add missing entry for max.shader_test in Makefile.am
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/48
On Linux, the FAT filesystem implementation allows DOS file attributes to be applied to files and
queried through a family of ioctls. Note that these ioctls are not yet supported by the NTFS or CIFS
drivers.
Signed-off-by: Joel Holdsworth <joel(a)airwebreathe.org.uk>
--
v3: ntdll: Add integration with Linux FAT file attributes
https://gitlab.winehq.org/wine/wine/-/merge_requests/1414
--
v3: ntdll: Inline __wine_unix_call_fast in the dispatcher.
winecrt0: Inline PE __wine_unix_call(_fast) function calls.
ntdll: Only save non-volatile FPU registers for -nofpu syscalls.
ntdll: Use -nofpu for NtQueryPerformanceCounter and NtYieldExecution syscall.
opengl32: Use __wine_unix_call_fast instead of __wine_unix_call.
ntdll: Introduce a new __wine_unix_call_fast syscall.
winebuild: Introduce a new -nofpu syscall spec flag.
ntdll: Use named labels for jumps in the syscall dispatcher.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1324
On Linux, the FAT filesystem implementation allows DOS file attributes to be applied to files and
queried through a family of ioctls. Note that these ioctls are not yet supported by the NTFS or CIFS
drivers.
Signed-off-by: Joel Holdsworth <joel(a)airwebreathe.org.uk>
--
v2: ntdll: Add integration with Linux FAT file attributes
https://gitlab.winehq.org/wine/wine/-/merge_requests/1414
This is the main remaining thing needed for wow64 thunk. My plan for wow64 thunks is a bit different than other modules. We usually use the same code for 32-bit and 64-bit builds, but have additional code for wow64. However, in winevulkan, we already have two separated code paths for 32-bit and 64-bit implementations and converting arguments is generally more involved than usually. My plan is to use the existing 32-bit thunks as wow64 thunks to avoid having three code paths. The price is that on plain 32-bit builds will do more conversions than strictly necessary, but it doesn't seem too bad.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1415
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45273
--
v7: gdiplus: fix shape of CustomLineCap created by GdipCreateAdjustableArrowCap.
gdiplus: Add support for widen path with GpCustomLineCap.
gdiplus: Move widen_open_figure function to be able to use it from add_anchor function.
gdiplus: Add GdipSetCustomLineCapBaseInset implementation.
gdiplus: Remove not used LineCustomCap parameter.
gdiplus: Add GdipSetCustomLineCapBaseCap implementation.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1297
DwmGetCompositionTimingInfo() may throw a zero division exception if the display reports a 0Hz
frequency, which can happen when testing under Xephyr without -fakescreenfps option.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1411
On Linux, the FAT filesystem implementation allows DOS file attributes to be applied to files and
queried through a family of ioctls. Note that these ioctls are not yet supported by the NTFS or CIFS
drivers.
Signed-off-by: Joel Holdsworth <joel(a)airwebreathe.org.uk>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1414
This op is heavily used by clang with PDB debug info, while
MSVC barely uses it.
This fixes a bunch of problems when loading PDB files generated
by clang (eg. the PDB files from wine-gecko).
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1412
Some applications use FindWindowA() with class Shell_TrayWnd to find the taskbar window on Windows.
Then GetWindowRect() is called to get the taskbar window rectangle. Finally, the taskbar window
rectangle is subtracted from the primary screen rectangle to calculate the work area. Without a
valid taskbar window position, these applications end up getting an incorrect work area and going
down the wrong path. So use the same position and size as the host system panel for explorer taskbar
when it's hidden.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1399
Overwatch 2 verifies that every kernel callback that is run, lives in user32. Introduce a callback in user32 that just forwards to the other modules' callbacks.
--
v16: include: Add a comment explaining why all kernel callbacks must be in user32.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1180
--
v2: ntdll: Check non-volatile rflags and skip popfq when possible.
ntdll: Use -nofpu for NtQueryPerformanceCounter syscall.
ntdll: Inline __wine_unix_call_fast in the dispatcher.
winecrt0: Inline PE __wine_unix_call(_fast) function calls.
ntdll: Only save non-volatile FPU registers for -nofpu syscalls.
opengl32: Use __wine_unix_call_fast instead of __wine_unix_call.
ntdll: Introduce a new __wine_unix_call_fast syscall.
winebuild: Introduce a new -nofpu syscall spec flag.
ntdll: Use named labels for jumps in the syscall dispatcher.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1324
Currently it's not obvious when the HLSL compiler fails, either due to a missing
feature or incorrectly coded error check, which can unnecessarily complicate
debugging.
It's legal for well-behaved programs to try to compile invalid shaders, but that
should be a rare enough case that it's worth printing it to Wine debug output
regardless.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1340
mrac tries to get function pointers for these functions using MmGetSystemRoutineAddress, I haven't seen them being used by it, but might as well implement it since they are very easy to implement.
--
v8: ntoskrnl.exe: Implement KeQueryActiveProcessorCount.
ntoskrnl.exe: implement KeQueryMaximumProcessorCount/Ex.
https://gitlab.winehq.org/wine/wine/-/merge_requests/914
I believe this information could be very useful for newcomers to the HLSL compiler.
Documentation often needs to reference other parts of the code, so it can be a problem
to update these references if the referenced code is modified.
However, I think that documentation in the data definitions (as opposed to documentation inside the
functions) is easier to maintain, since each data type is declared in a single place, to which one
often keeps going back for reference, so it is less probable to forget to update a comment.
Also, it opens up the possibility of explaining **what** things are, instead of **how they are used**, in
some cases, avoiding these references to other places in the code.
I can think on the following additional benefits:
* Updates in these documentation comments, when the way a field is used changes, or when new fields are added,
can help making future commits more readable.
* Some IDEs display the comments above the field/struct declaration when the cursor is over an use of
this field/struct.
A hopefully not deceiving sketch:

--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/38
This implements some events related to document/window load and unload / visibility changes. The latter is related in that native partially implements it, and only sends it when it is minimized or restored from being minimized, not on navigation or anything else.
The main issue for me is the visibilitychange patch. Since we don't control the container hwnd, and it can even be in another process, there is no way to be notified cleanly when it changes its minimization state. We can't subclass it either, as the tests show, it's not subclassed.
I implemented it now using an internal timer that polls for that, since it was the least invasive and works in all cases, including other process hwnd. Hooks wouldn't be able to do that, and are also more invasive IMO. I'm hoping for better ideas, though.
--
v2: mshtml: Implement pagehide event.
mshtml: Implement unload event.
mshtml: Implement pageshow event.
mshtml: Add visibilitychange event stub.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1373
There are cases in StructConversionFunction.definition where we will
generate copy code for extension struct members, without emitting the
definition of the "in_ext" variable used in the copy code.
This issue is triggered by mismatches in the condition that guards the
generation of the "in_ext" definition, and the condition(s) that govern
the generation of the member copy code (e.g., in
StructConversionFunction.member_needs_copy and
VkMember.needs_conversion).
In order to avoid such mismatches and the burden of having to keep the
conditions in sync, this commit generates the definition on demand, by
checking if it's actually needed by the member copy code.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis(a)collabora.com>
--
Some more details in case a different solution becomes apparent.
An example of the aforementioned issue can be triggered if we make VK_EXT_image_drm_format_modifier an UNEXPOSED extension in `make_vulkan`:
```
../wine/dlls/winevulkan/vulkan_thunks.c: In function ‘convert_VkFormatProperties2_win32_to_host’:
../wine/dlls/winevulkan/vulkan_thunks.c:10214:119: error: ‘in_ext’ undeclared (first use in this function); did you mean ‘index’?
10214 | out_ext->pDrmFormatModifierProperties = convert_VkDrmFormatModifierPropertiesEXT_array_win32_to_host(ctx, in_ext->pDrmFormatModifierProperties, in_ext->drmFormatModifierCount);
| ^~~~~~
| index
```
In this particular case the mismatch happens because for the `VkDrmFormatModifierPropertiesListEXT` (returnedonly=true) struct in the INPUT direction the current check doesn't emit `in_ext`:
```
if self.direction == Direction.OUTPUT or not ext.returnedonly: # Not triggered
body += ident + "{0} *in_ext = ({0} *)in_header;\n".format(in_type)
```
but `self.member_needs_copy(ext, m)` below for the "pDrmFormatModifierProperties" member returns `True`, requiring `in_ext`. The flow is:
```
* self.member_needs_copy(ext, m) => True
if m.name != "sType" and struct.returnedonly and not m.needs_conversion(self.conv, self.unwrap, Direction.INPUT, self.const): # Not triggered
return False
return True
* m.needs_conversion(self.conv, self.unwrap, Direction.INPUT, self.const) => True
# if pointer member needs output conversion, it also needs input conversion
# to allocate the pointer
if direction == Direction.INPUT and self.is_pointer() and \
self.needs_conversion(conv, unwrap, Direction.OUTPUT, struct_const):
return True
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1390
Based on [a patch](https://www.winehq.org/mailman3/hyperkitty/list/wine-devel@winehq.or… by Jinoh Kang (@iamahuman) from February 2022.
I removed the need for the event object and implemented fast paths for Linux.
On macOS 10.14+ `thread_get_register_pointer_values` is used on every thread of the process.
On Linux 4.14+ `membarrier(MEMBARRIER_CMD_GLOBAL_EXPEDITED, ...)` is used.
On x86 Linux <= 4.13 `madvise(..., MADV_DONTNEED)` is used, which sends IPIs to all cores causing them to do a memory barrier.
On non-x86 Linux <= 4.2 and on other platforms the fallback path using APCs is used.
--
v7: ntdll: Add thread_get_register_pointer_values-based fast path for NtFlushProcessWriteBuffers.
ntdll: Add sys_membarrier-based fast path to NtFlushProcessWriteBuffers.
ntdll: Add MADV_DONTNEED-based fast path for NtFlushProcessWriteBuffers.
ntdll: Implement NtFlushProcessWriteBuffers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/741
This implements some events related to document/window load and unload / visibility changes. The latter is related in that native partially implements it, and only sends it when it is minimized or restored from being minimized, not on navigation or anything else.
The main issue for me is the visibilitychange patch. Since we don't control the container hwnd, and it can even be in another process, there is no way to be notified cleanly when it changes its minimization state. We can't subclass it either, as the tests show, it's not subclassed.
I implemented it now using an internal timer that polls for that, since it was the least invasive and works in all cases, including other process hwnd. Hooks wouldn't be able to do that, and are also more invasive IMO. I'm hoping for better ideas, though.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1373
Please don't update MR after it was approved (unless there's a reason to do that, like e.g. you have found a bug, there are conflicts during rebase). It invalidates the review.
Since it was a simple rebase the patch still looks good for me.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1365#note_16031
Some programs try to import these functions from kernel32.dll instead of kernelbase.dll
--
v2: kernel32: Forward MapViewOfFileFromApp kernel32 to kernelbase.
kernel32: Forward CreateFileMappingFromApp kernel32 to kernelbase.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1374
Surrogates have to be written in pairs. Also, handle related errors
Signed-off-by: David Kahurani <k.kahurani(a)gmail.com>
--
v5: xmllite/writer: Handle surrogate pairs
xmllite/writer: Pass xmlwriteroutput directly.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1334
If rawinput_from_hardware_message generates an error then the number of
packets handled may be less then the size of the buffer. Correctly
report only the successfully processed packets to avoid using
uninitialized data.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1364
This merge request allows for statements on the same line as ELSE:
```
Dim vrOption
vrOption = 3
If vrOption = 1 Then
Wscript.Echo "vroption is 1"
ElseIf vrOption = 2 Then
Wscript.Echo "vroption is 2"
Else If vrOption = 3 Then
Wscript.Echo "vroption is 3"
End If
End If
```
Fixes https://bugs.winehq.org/show_bug.cgi?id=53873
Combined effort from myself and Nikolay Sivov
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1385
On Mon Nov 14 20:46:59 2022 +0000, Bartosz Kosiorek wrote:
> Is `#if _MSVCR_VER<=120` necessary?
It's not necessary for the dlls to work correctly. It makes dlls smaller (at least until some kind of link time optimization is enabled). It also speeds up compilation.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1365#note_15998