I was going to reimplement path resolution in ShellExecute, but half way through I realized that's very unnecessary.
Since what I wanted is a version of `PathResolve` that behaves differently _only_ for filespec paths, I ended up duplicating a lot of code, then I realized I can still pass filespec paths onto `PathResolve` and only deal with non-filespec paths.
--
v3: shell32: Fix ShellExecute for non-filespec paths.
shell32: Make sure array passed to PathResolve is big enough.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5692
The first commit adds some test infrastructure to be able check raw input keyboard events, along with a few tests relevant to the code paths in this MR.
The second commit fixes raw input behavior with unicode inputs, and adds regression tests. Note that it was difficult to express the current Wine behavior with TODOs in the expected sequence, that's why I didn't introduce these regression tests independently.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5754
Presently the wine file explorer has a create shortcut entry that does nothing. This implements the FCIDM_SHVIEW_CREATELINK command.
This is a patch that was first submitted in 2017 and I unfortunately let the revision request fall unimplemented.
--
v5: shell32: Implement FCIDM_SHVIEW_CREATELINK
https://gitlab.winehq.org/wine/wine/-/merge_requests/5373
This series of patches introduces a new set of structures and functions that will enable code to be re-used across various functions in d3dx9, and eventually d3dx10-d3dx11. It might be possible to split this further, but I feel like this initial set gives better context as to where things are heading.
I have a [branch](https://gitlab.winehq.org/cmcadams/wine/-/commits/WIP/d3dx-shared-s… that uses these structures and functions in d3dx10 if further context would be useful. There are a lot of changes here, but after playing around with different approaches this was the best/cleanest way I could come up with for code sharing. I'm sure there will be things I missed or potentially ways to improve this, I'm open to suggestions of course. :)
--
v2: d3dx9: Use d3dx_load_pixels_from_pixels() in D3DXLoadVolumeFromMemory().
d3dx9: Use d3dx_pixels structure in decompression helper function.
d3dx9: Introduce d3dx_load_pixels_from_pixels() helper function.
d3dx9: Use d3dx_image structure in D3DXLoadSurfaceFromFileInMemory().
d3dx9: Introduce d3dx_image structure for use in D3DXGetImageInfoFromFileInMemory().
d3dx9: Refactor WIC image info retrieval code in D3DXGetImageInfoFromFileInMemory().
d3dx9: Refactor WIC GUID to D3DXIMAGE_FILEFORMAT conversion code.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5666
Two patches to add two new interfaces and one to fix an existing one.
--
v3: include: Correct IRowsetNotify HROW parameter type
include: Add IPreviewHandler* interfaces
include: shtypes.idl - Add LOGFONTA/W typedef.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5740
I expect this is going to be tricky to get in. I ran into the following issues:
* test_ShowWindow behaves very strangely on Windows. It seems this isn't typical behavior, and is caused by an interaction with test_SetFocus, but I'm not sure exactly what it does to the thread state that causes this.
* Many of the SetWindowPos flag combinations tested don't actually show the window on Windows, therefore they don't send EVENT_SYSTEM_FOREGROUND. I was able to reproduce this with a stand-alone test, so it seems to be normal behavior.
* Windows can show a window without activating it, and Wine on X11 can't do that reliably for managed windows.
* There are a couple of cases where Windows sends an event and Wine doesn't. I figure it's OK to not cover every case, but I can go back and investigate those if needed.
This interacts with https://gitlab.winehq.org/wine/wine/-/merge_requests/2314, in that the tests don't really test much without it. I applied that MR for my own testing.
--
v5: win32u: Implement EVENT_SYSTEM_FOREGROUND.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2853
I expect this is going to be tricky to get in. I ran into the following issues:
* test_ShowWindow behaves very strangely on Windows. It seems this isn't typical behavior, and is caused by an interaction with test_SetFocus, but I'm not sure exactly what it does to the thread state that causes this.
* Many of the SetWindowPos flag combinations tested don't actually show the window on Windows, therefore they don't send EVENT_SYSTEM_FOREGROUND. I was able to reproduce this with a stand-alone test, so it seems to be normal behavior.
* Windows can show a window without activating it, and Wine on X11 can't do that reliably for managed windows.
* There are a couple of cases where Windows sends an event and Wine doesn't. I figure it's OK to not cover every case, but I can go back and investigate those if needed.
This interacts with https://gitlab.winehq.org/wine/wine/-/merge_requests/2314, in that the tests don't really test much without it. I applied that MR for my own testing.
--
v4: user32: Run tests that notice focus changes early.
win32u: Implement EVENT_SYSTEM_FOREGROUND.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2853
Two main changes:
- VM configuration in build.yml for the executor.
- The build-mac script is now architecture-agnostic.
--
v2: gitlab: Update configuration for the new Mac runner.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5749
--
v3: win32u: Use a helper to flush window surface, factor locking and bounds reset.
wineandroid: Hold the lock while reading window surface bits.
winemac: Get rid of unnecessary blit_data / drawn surface members.
win32u: Move window surface bounds to the window_surface base struct.
win32u: Use helpers to lock/unlock window surfaces.
win32u: Move the window surface mutex to the surface header.
win32u: Introduce a new window_surface_init helper.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5747
--
v2: win32u: Use a helper to flush window surface, factor locking and bounds reset.
winemac: Get rid of unnecessary blit_data / drawn surface members.
win32u: Move window surface bounds to the window_surface base struct.
win32u: Use helpers to lock/unlock window surfaces.
win32u: Move the window surface mutex to the surface header.
win32u: Introduce a new window_surface_init helper.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5747
I looked a bit at mmdevice properties, turns out device strings are available directly from property store, using this key:
{9c119480-ddc2-4954-a150-5bd240d454ad},1
The only problem is it's not documented in SDK. But the idea would be to populate property store with setupapi, or use setupapi/cfgmgr directly.
Anyway, mentioning this in case we'll even need it.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5734#note_71634
Killsquad sends a MESessionClose at various times depending on user input. It always expects a MESessionClosed event and will wait indefinitely if not received. There are currently a number of scenarios where we don't report the MESessionClose event. This MR attempts to fix that.
--
v3: mf: Handle Source/Sink shutdown whilst waiting for an event.
mf: Handle an error during Media Session Close.
mf: Handle MediaSession Close when state is SESSION_STATE_RESTARTING_SOURCES.
mf/tests: Add additional tests for MESessionClosed event.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5584
When `FindFirstFileA` is called with `<path>/<file>/*` (where file is expected to be a directory), Windows uses the `ERROR_DIRECTORY` error.
This patch changes Wine's implementation to match Windows. This fixes a crash in Unity of Command II.
--
v3: server: Don't always return STATUS_OBJECT_NAME_INVALID on ENOTDIR.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5737
On Tue May 28 08:16:35 2024 +0000, Brendan McGrath wrote:
> I just tested on Windows, and that's exactly what it does. I'll update
> the MR.
Thanks for taking a look @nsivov. I think I've fixed it in the right spot now.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5737#note_71615
When `FindFirstFileA` is called with `<path>/<file>/*` (where file is expected to be a directory), Windows uses the `ERROR_DIRECTORY` error.
This patch changes Wine's implementation to match Windows. This fixes a crash in Unity of Command II.
--
v2: server: Don't return STATUS_OBJECT_NAME_INVALID on ENOTDIR.
ntdll/tests: Test error code when NtOpenFile uses file as directory.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5737
Currently, when GPUs are being added and display driver only provides a fake one (like e.g. winex11.drv does on Xwayland), its default name and empty UUID and PCI IDs will be preferred over ones reported by Vulkan. When Vulkan-only GPUs are added later, the resulting list will look like so:
```
Xrandr GPU 0x0000:0x0000 {00000000-0000-0000-0000-000000000000}
NVIDIA GeForce RTX 4080 Laptop GPU 0x10de:0x27e0 {13938ad6-4925-b628-c068-30558bc4b489}
```
Instead, when default or empty properties were provided, we should prefer ones from Vulkan as they are more likely to be accurate:
```
Intel(R) Graphics (RPL-S) 0x8086:0xa788 {a7888086-0004-0000-0002-000000000000}
NVIDIA GeForce RTX 4080 Laptop GPU 0x10de:0x27e0 {13938ad6-4925-b628-c068-30558bc4b489}
```
This is important for LUIDs to be later correctly assigned by winevulkan which searches for matching GPU by UUID.
I'm not exactly sure if this implementation is the way to go (especially reporting and checking name for `"Wine GPU"`) but it's probably one of the simplest possible. Let me know if we already have some empty UUID around I could use for the comparison.
--
v3: win32u: Prefer Vulkan UUIDs over empty ones.
win32u: Prefer Vulkan PCI IDs over empty ones.
win32u: Use common name for fake GPUs and prefer Vulkan name over it.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5736
--
v5: win32u: Only keep DPI awareness context with window objects.
win32u: Fix SetThreadDpiAwarenessContext.
win32u: Pass the DPI awareness context in win_proc_params.
win32u: Get the thread DPI context instead of the awareness.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5738
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56698
I'm not hugely satisfied with some of those changes (especially how looping avi_decompressor_source_get_media_type now takes O(n^2) calls to ICDecompressQuery), but it gets the video in that issue working.
If you've got a better idea for how to implement this stuff, do tell.
--
v4: msvfw32/tests: Test that Cinepak rejects unsupported output types.
iccvid: Reject unsupported output types.
quartz/tests: Add Cinepak test to avi splitter.
winegstreamer: Try DTS if PTS is absent.
winegstreamer: Implement AM_MEDIA_TYPE to wg_format converter for Cinepak video.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5744
There is a check earlier in the PSDRV_MergeDevmodes/merge_devmodes functions to update
dmDefaultSource if a slot is found, and so this member should not be
updated again with no such check.
--
v2: wineps.drv: Only merge dmDefaultSource member of devmodes when a slot is found.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5720
This is an early draft of an implementation of key auto-repeat in wineserver to get some feedback. Some open questions:
1. queue_keyboard_message requires a `current` thread, but we don't get one in timeout callbacks. At the moment I am manually setting `current` to the foreground thread, but I am wondering if that's acceptable or we should explore other ways forward (also see TODO in code).
2. This draft introduces a new server request to configure auto-repeat (`enable/delay/period`). I am thinking that for more straightforward integration with the keyboard repeat SPI parameters, the request should only support the `enable` flag and the server should query the SPI registry values to get `delay` and `period` when needed. I am wondering if there any caveats here since I don't see other code in the server querying registry values (well, except to implement the registry requests themselves).
Also, I would hope that opening and caching the `HKCU\Control Panel\Keyboard` hkey would remove most of the cost of performing this operation (if that's even a concern at all).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5741
These patches fix painting in an application that draws outside of a CS_PARENTDC child
client area in its WM_PAINT handler.
Comments and suggestions are welcome.
--
v2: win32u: Use parent rectangle for visible region calculations of a CS_PARENTDC child.
win32u: Don't clip update region to the window client rectangle.
win32u: GetUpdateRgn() should clip update region to the window client area.
win32u: GetUpdateRect() should clip update rectangle to the window client area.
win32u: Clip PAINTSTRUCT.rcPaint to the window client area.
server: For a CS_PARENTDC child use parent for visible region calculations.
server: If the being validated region covers whole window then validate everything.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5665
--
v4: win32u: Only keep DPI awareness context with window objects.
win32u: Fix SetThreadDpiAwarenessContext.
win32u: Pass the DPI awareness context in win_proc_params.
win32u: Get the thread DPI context instead of the awareness.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5738
Currently, when GPUs are being added and display driver only provides a fake one (like e.g. winex11.drv does on Xwayland), its default name and empty UUID and PCI IDs will be preferred over ones reported by Vulkan. When Vulkan-only GPUs are added later, the resulting list will look like so:
```
Xrandr GPU 0x0000:0x0000 {00000000-0000-0000-0000-000000000000}
NVIDIA GeForce RTX 4080 Laptop GPU 0x10de:0x27e0 {13938ad6-4925-b628-c068-30558bc4b489}
```
Instead, when default or empty properties were provided, we should prefer ones from Vulkan as they are more likely to be accurate:
```
Intel(R) Graphics (RPL-S) 0x8086:0xa788 {a7888086-0004-0000-0002-000000000000}
NVIDIA GeForce RTX 4080 Laptop GPU 0x10de:0x27e0 {13938ad6-4925-b628-c068-30558bc4b489}
```
This is important for LUIDs to be later correctly assigned by winevulkan which searches for matching GPU by UUID.
I'm not exactly sure if this implementation is the way to go (especially reporting and checking name for `"Wine GPU"`) but it's probably one of the simplest possible. Let me know if we already have some empty UUID around I could use for the comparison.
--
v2: win32u: Prefer Vulkan UUIDs over empty ones.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5736
--
v2: winex11: Stop using a recursive mutex for the window surfaces.
winewayland: Stop using a recursive mutex for the window surfaces.
winemac: Stop using a recursive mutex for the window surfaces.
wineandroid: Stop using a recursive mutex for the window surfaces.
win32u: Stop using a recursive mutex for the offscreen surface.
win32u: Remove surface recursive locking requirement.
win32u: Flush window surface when it is fully unlocked.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5470