Instead of checking for monitor rect.
Similar purpose as https://gitlab.winehq.org/wine/wine/-/merge_requests/7362
--
v2: winewayland: Pass fullscreen flag to is_window_managed.
winex11: Pass fullscreen flag to is_window_managed.
winex11: Check managed window changes in WindowPosChanged.
winex11: Request managed window changes asynchronously.
winex11: Initialize window managed flag in create_whole_window.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7370
Add Expat as a dependency, and use it to parse the XML returned from FreeBSD's kern.sched.topology_spec sysctl.
--
v4: ntdll: implement create_logical_proc_info on FreeBSD.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7339
This is an attempt at improving X11 focus handling, and will most importantly be useful to later better handle dynamic window decoration changes on any mutter-based window manager. These window managers do a little dance in that case, unmapping/mapping the window every time decoration are added/removed, and we often get confused by the focus events it triggers.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7182
This broke after d58e917e2cb36c6ffcb259356c06171d8f6d4dcc in some situations, since it resulted in us calling wined3d_texture_download_from_texture() with CLEARED location. The latter was not aware of CLEARED and incorrectly assumed the source texture was in TEXTURE_SRGB.
--
v2: wined3d: Explicitly check for BUFFER/SYSMEM before calling wined3d_texture_download_from_texture().
wined3d: Propagate a CLEARED location when blitting.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7313
commit cb87d40cd4a8837826ea76efc91371ab09eb9d63 removed the ability (from the inside the tools/wine-wrapper) to have some local settings (per build tree) where one can adapt environment for launching wine
this MR allows at configure time to specify an (external) wine wrapper to use for a given build tree
Signed-off-by: Eric Pouech epouech(a)codeweavers.com
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7361
The Microsoft WMV decoder has a bug/feature where orientation of
the first output type determines the orientation for all subsequent
RGB output types.
If the transform is created new, then the orientation is determined by
the value of the MF_MT_DEFAULT_STRIDE.
This MR adds tests for that behavior and implements it in Wine.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7366
This adds Mach thread priority support (both in the application and realtime band) and recalculates thread priorities when the process priority changes.
Part 3, which is still a bit WIP deals with implementing priority boosts (for main threads and threads which are processing window messages), effectively fully replacing https://gitlab.winehq.org/wine/wine/-/merge_requests/1232.
Currently the implementation in this MR already technically overrides what https://gitlab.winehq.org/wine/wine/-/…
[View More]merge_requests/1232 does, if it makes sense I can also revert it here.
I added a few comments regarding the Mach thread priority API usage, as there is limited documentation available, and much was inferred from the source or by testing. If this is too verbose I can also remove that...
--
v2: server: Re-apply thread priorities after process tracing is initialized.
server: Implement apply_thread_priority on macOS for realtime priorities.
server: Implement apply_thread_priority on macOS for application priorities.
kernel32/tests: Setting process priority on a terminated process should succeed.
server: Also set thread priorities upon process priority change.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7317
[View Less]
Make both method calls;
1. Consistently written with parameter names as per spec.
2. Fix parameter validation to be consistent with spec.
3. Fix szNameBuf parameter semantics as per spec.
4. Fix szNameBuf casing str search as per spec.
5. Factor out common code into TLB_ helpers vastly improves readability.
--
v28: dlls/oleaut32: Read in the hashmap data while loading typelib
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of …
[View More]the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7286
[View Less]
The Windows Bluetooth stack uses private IOCTLs in order to set the [discoverability](https://learn.microsoft.com/en-us/windows/win32/api/blueto… and [connectability](https://learn.microsoft.com/en-us/windows/win32/api/bluetoo… status of a local radio. This MR introduces the wine-specific IOCTL `IOCTL_WINBTH_RADIO_SET_FLAG` for the same purpose, as most applications seem to the Win32 API itself for these operations.
--
v16: bluetoothapis: Implement BluetoothEnableDiscovery.
…
[View More]bluetoothapis/tests: Add tests for BluetoothEnableDiscovery.
bluetoothapis: Add stub for BluetoothEnableDiscovery.
bluetoothapis: Implement BluetoothEnableIncomingConnections.
bluetoothapis/tests: Add tests for BluetoothEnableIncomingConnections.
bluetoothapis: Add stub for BluetoothEnableIncomingConnections.
winebth.sys: Call bluez_watcher_close as part of bluetooth_shutdown.
winebth.sys: Implement IOCTL_WINEBTH_RADIO_SET_FLAG.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7216
[View Less]
The Windows Bluetooth stack uses private IOCTLs in order to set the [discoverability](https://learn.microsoft.com/en-us/windows/win32/api/blueto… and [connectability](https://learn.microsoft.com/en-us/windows/win32/api/bluetoo… status of a local radio. This MR introduces the wine-specific IOCTL `IOCTL_WINBTH_RADIO_SET_FLAG` for the same purpose, as most applications seem to the Win32 API itself for these operations.
--
v15: bluetoothapis: Implement BluetoothEnableDiscovery.
…
[View More]bluetoothapis/tests: Add tests for BluetoothEnableDiscovery.
bluetoothapis: Add stub for BluetoothEnableDiscovery.
bluetoothapis: Implement BluetoothEnableIncomingConnections.
bluetoothapis/tests: Add tests for BluetoothEnableIncomingConnections.
bluetoothapis: Add stub for BluetoothEnableIncomingConnections.
winebth.sys: Call bluez_watcher_close as part of bluetooth_shutdown.
winebth.sys: Implement IOCTL_WINEBTH_RADIO_SET_FLAG.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7216
[View Less]
The Windows Bluetooth stack uses private IOCTLs in order to set the [discoverability](https://learn.microsoft.com/en-us/windows/win32/api/blueto… and [connectability](https://learn.microsoft.com/en-us/windows/win32/api/bluetoo… status of a local radio. This MR introduces the wine-specific IOCTL `IOCTL_WINBTH_RADIO_SET_FLAG` for the same purpose, as most applications seem to the Win32 API itself for these operations.
--
v14: bluetoothapis: Implement BluetoothEnableDiscovery.
…
[View More]bluetoothapis/tests: Add tests for BluetoothEnableDiscovery.
bluetoothapis: Add stub for BluetoothEnableDiscovery.
bluetoothapis: Implement BluetoothEnableIncomingConnections.
bluetoothapis/tests: Add tests for BluetoothEnableIncomingConnections.
bluetoothapis: Add stub for BluetoothEnableIncomingConnections.
winebth.sys: Call bluez_watcher_close as part of bluetooth_shutdown.
winebth.sys: Implement IOCTL_WINEBTH_RADIO_SET_FLAG.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7216
[View Less]
The Windows Bluetooth stack uses private IOCTLs in order to set the [discoverability](https://learn.microsoft.com/en-us/windows/win32/api/blueto… and [connectability](https://learn.microsoft.com/en-us/windows/win32/api/bluetoo… status of a local radio. This MR introduces the wine-specific IOCTL `IOCTL_WINBTH_RADIO_SET_FLAG` for the same purpose, as most applications seem to the Win32 API itself for these operations.
--
v13: bluetoothapis: Implement BluetoothEnableDiscovery.
…
[View More]bluetoothapis/tests: Add tests for BluetoothEnableDiscovery.
bluetoothapis: Add stub for BluetoothEnableDiscovery.
bluetoothapis: Implement BluetoothEnableIncomingConnections.
bluetoothapis/tests: Add tests for BluetoothEnableIncomingConnections.
bluetoothapis: Add stub for BluetoothEnableIncomingConnections.
winebth.sys: Call bluez_watcher_close as part of bluetooth_shutdown.
winebth.sys: Implement IOCTL_WINEBTH_RADIO_SET_FLAG.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7216
[View Less]
Fixes a bug where music on the radio in Fallout 3 is silent.
Upon receiving EOS, the game resets the position of the stream and then calls `IMediaControl_Run()` without calling `IMediaControl_Stop()`. In wine, this results in the `got_ec_complete` variable being uncleared, and the stream position is stuck at end of stream.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7358
Some compositors (e.g., kwin) will send a done event for every commit,
regardless of the focus state of the text input. This behavior is
arguably(?) out of spec, but otherwise harmless, so just ignore the new
state in such cases.
--
To reproduce (without the fix) simple open notepad under kwin and change the focus do a different window. The root cause of this is that kwin is responding to the disable&commit we perform on text_input leave.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7359
This is the refactoring of the tests in !7160. I submit a new seperate MR because I want to get the tests upstreamed first, otherwise making changes to tests patches needs rebasing the implementation patches. So plz review the tests MR first.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7332
If a surface is being clipped and hides the cursor, drawing its own one,
winewayland constrains using a pointer lock and enables Wayland relative
motion. If the application decides to stop drawing its own cursor and
make the cursor visible, winewayland will disable relative motion and
pointer lock, and enable pointer confinement. The user will perceive a
pointer jump from the win32/application drawn cursor to where the
Wayland pointer is after being unlocked and an absolute motion event is
…
[View More]received, because they were desynchronized due to the Wayland one being
locked in place.
The pointer constraints protocol says this:
> If the client is drawing its own cursor, it should update the position
> hint to the position of its own cursor. A compositor may use this
> information to warp the pointer upon unlock in order to avoid pointer
> jumps.
So, right before unlocking, make a request for the compositor to warp
the pointer to the win32 position on pointer unlock.
--
v2: winewayland: Request warp to win32 position on pointer unlock.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7352
[View Less]
--
v2: oleaut32: Add support for decoding SLTG variable help strings.
oleaut32: Add support for decoding SLTG function help strings.
oleaut32: Implement decoding of SLTG help strings.
oleaut32: 'typekind' is the last field of SLTG_OtherTypeInfo structure.
oleaut32: Fix logic for deciding whether type description follows the name.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7334
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57665
---
The issue is that The Medium launcher uses a dialog window procedure, and implements its background by doing a StretchBlt call on WM_PAINT in the dialog procedure call, which happens before the window message loop.
It then itself calls InvalidateRect(hwnd, NULL, 0), which queues a WM_PAINT as well but with only the RDW_INVALIDATE flag.
Next, when the window message loop is executed, the WM_PAINT message is being processed as it …
[View More]should, but as we've invalidate the window with RDW_ERASE ourselves from the expose event, the WM_NCPAINT handler erases the entire window, clearing the pixels that the launcher has just painted.
This regressed since the window surface clipping region logic changed, as the expose event handling was previously not calling `NtUserRedrawWindow` on windows with a surface and without a clipping region. The clipping region was also previously not always set, or set later, and we're setting it more consistently since 51b16963f6e0e8df43118deac63f640aee4698b7, even when it matches the window rect, for compatibility with some old wineandroid logic (where I believe it was used to clip window surfaces to their proper sizes).
--
v3: winex11: Avoid setting RDW_ERASE on expose events.
explorer: Paint the desktop even without RDW_ERASE.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7157
[View Less]
This cleans up `LDR_DONT_RESOLVE_REFS` checks in preparation for !7.
--
v4: ntdlll: Remove redundant LDR_DONT_RESOLVE_REFS checks before calling process_attach().
ntdll: Skip DLL initialization and ldr notification entirely if DONT_RESOLVE_DLL_REFERENCES is set.
kernel32/tests: Test for unexpected loader notification for import dependency loaded with DONT_RESOLVE_DLL_REFERENCES.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7347
There is no ([not yet?](https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requ…) dedicated protocol for requesting pointer warps, but it's possible to request one with `zwp_locked_pointer_v1.set_cursor_position_hint` which may be performed when the pointer is unlocked. The idea is to quickly lock/set position/unlock. This is used by SDL (in some cases: [SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE](https://wiki.libsdl.org/SDL3/SDL_HINT…) and Xwayland. The limitation is/will be that the …
[View More]compositor will ignore requests to warp the pointer outside of surface bounds.
What I'd like to have working is the auto cursor placement feature of some applications, where they just want to call SetCursorPos towards specific UI elements inside their single window, and usually they'll be unclipped and have a visible cursor while doing this.
This patch also happens to allow mouselook to work in applications which use SetCursorPos for mouselook and aren't getting covered by the heuristics that turn on Wayland relative motion (for some reason the driver thinks the cursor is visible). Seems to affect Half-Life (GoldSrc) on my system. Though force enabling relative motion with an environment variable in a custom build or somehow improving the heuristics will also fix that.
A suface/pointer can only have one lock or confinement, and this implementation depends on the pointer lock. So if needed, I temporarily unlock/unconfine in order to do the warp then relock/reconfine. I modified `wayland_pointer_update_constraint` so I don't have to temporarily disable relative motion during this in case it's enabled. I think it's safe/a no-op to attempt pointer warps while using relative motion, as according to the protocol the warp will not generate a relative motion event, and while there will be a wl_pointer motion event, they're ignored while relative motion is being used.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7353
[View Less]
If a surface is being clipped and hides the cursor, drawing its own one,
winewayland constrains using a pointer lock and enables Wayland relative
motion. If the application decides to stop drawing its own cursor and
make the cursor visible, winewayland will disable relative motion and
pointer lock, and enable pointer confinement. The user will perceive a
pointer jump from the win32/application drawn cursor to where the
Wayland pointer is after being unlocked and an absolute motion event is
…
[View More]received, because they were desynchronized due to the Wayland one being
locked in place.
The pointer constraints protocol says this:
> If the client is drawing its own cursor, it should update the position
> hint to the position of its own cursor. A compositor may use this
> information to warp the pointer upon unlock in order to avoid pointer
> jumps.
So, right before unlocking, make a request for the compositor to warp
the pointer to the win32 position on pointer unlock.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7352
[View Less]
On Tue Feb 18 06:30:29 2025 +0000, Nikolay Sivov wrote:
> I knew I commented on these changes before, but then I found it was
> !7244. Could we merge those, or what's the plan?
No problem to do that if 11 commits are ok.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7174#note_94962
Startup and lock counts in native Windows are separate, and the lock count does not decrease when an async result is freed if the platform has been started.
--
v5: rtworkq: Introduce an async result object cache.
rtworkq: Introduce a platform startup count.
rtworkq/tests: Test work queue.
mfplat/tests: Test platform startup and lock counts.
mfplat/tests: Test mixing of MF platform functions with their Rtwq equivalents.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7174
Port the XML parser from dlls/ntdll/actctx.c to ASCII and use it to parse
the XML returned from FreeBSD's kern.sched.topology_spec sysctl.
--
v3: ntdll: implement create_logical_proc_info on FreeBSD.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7339
This cleans up `LDR_DONT_RESOLVE_REFS` checks in preparation for !7.
--
v3: ntdlll: Remove redundant LDR_DONT_RESOLVE_REFS checks before calling process_attach().
ntdll: Skip DLL initialization and ldr notification entirely if DONT_RESOLVE_DLL_REFERENCES is set.
kernel32/tests: Test for unexpected loader notification for import dependency loaded with DONT_RESOLVE_DLL_REFERENCES.
kernel32/tests: Test for unexpected LDR_PROCESS_ATTACHED flag in import dependency loaded with …
[View More]DONT_RESOLVE_DLL_REFERENCES.
kernel32/tests: Add basic tests for internal flags of modules loaded with DONT_RESOLVE_DLL_REFERENCES.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7347
[View Less]
On Wed Jan 1 16:32:32 2025 +0000, Nikolay Sivov wrote:
> @alexhenrie is it possible to create a drive without a letter? Regarding
> wine supporting only drives with assigned letters, I don't think it
> matters that much if it turns out to be easy to return a correct path.
> IDrive has separate properties for paths and letters, so maybe there is
> a reason for that.
My understanding is that the way to query all available drives is via DriveCollection. Due to this I changed the …
[View More]tests to what Alex Henrie suggested as it will properly verify the functionality of the function.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7060#note_94929
[View Less]
This is a bit convoluted because of the amount of pieces involved. I'll
try to untangle things a bit.
The container id is meant to be globally unique and stable. We therefore
need a suitable amount of stable entropy that we can feed into a hash
function to get a stable and unique output.
This happens in winebus. The corner stone of hash inputs is the linux
device topology (sysfs path) obtained via udev. Along with all other
possible data we feed this into a hash function to obtain our …
[View More]container
id.
A bunch of extra wine-specific keys needed to be added to carry the
necessary metadata from the driver into the ntoskrnl (where it gets
written to the property registry of the relevant device).
Separate from this we also ingest the linux device topology (sysfs path)
in the winepulse driver.
In mmdevapi we then use winepulse's sysfs path to find the matching
device in the setupapi and query its container id. We now have the same
container id in both the device and the MMDevice, allowing applications
(in particular Games) to find the MMDevice for a given device.
For practical reasons we always resolve the sysfs path to the root
device as early as possible. Container ids are meant to be equal for sub
devices inside a "container" anyway.
--
v4: containerid: helper to generate a containerid from a sysfs path
mmdevapi: correctly read and write containerid as clsid blob
https://gitlab.winehq.org/wine/wine/-/merge_requests/7238
[View Less]
This cleans up `LDR_DONT_RESOLVE_REFS` checks in preparation for !7.
--
v2: ntdlll: Remove redundant LDR_DONT_RESOLVE_REFS checks before calling process_attach().
ntdll: Skip DLL initialization and ldr notification entirely if DONT_RESOLVE_DLL_REFERENCES is set.
kernel32/tests: Test for unexpected loader notification for import dependency loaded with DONT_RESOLVE_DLL_REFERENCES.
kernel32/tests: Test for unexpected LDR_PROCESS_ATTACHED flag in import dependency loaded with …
[View More]DONT_RESOLVE_DLL_REFERENCES.
kernel32/tests: Add basic tests for internal flags of modules loaded with DONT_RESOLVE_DLL_REFERENCES.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7347
[View Less]
Allow the user to press Ctrl-C to abort lengthy DIR (or DIR /p, etc.) operations.
--
v13: programs/cmd: Implement ability to abort lengthy directory operations via Ctrl-C.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7322
On Mon Feb 17 19:22:08 2025 +0000, eric pouech wrote:
> thanks for taking the time to update your patch
> unfortunately, it fails on wine regression test
> the attached patch should solve this
> [patch.ctrlc](/uploads/84ae84d1c5cf3d3dfc19904c673bc906/patch.ctrlc)
> also, any reason you changed the ctrl event for and automatic reset?
> actually, I was puzzled with the previous versions with a manual reset
> (my first guess would have been to implement it with an automatic …
[View More]reset)
> I tried things like '(dir /s \\\* || echo aaaaa) && dir \*' (and halting
> the first dir command with ctrl-c) on native:
> * does break the first dir command,
> * executes the RHS of || (as the dir command failed because of the
> ctrl-c),
> * prints the 'aaaaa' string
> * executes the RHS of && (as last command of LHS, eg echo, did succeed),
> * outputs just the directory header (but nothing else) for the second dir
> which fits better with a manual reset (it could be implemented in native
> with something else, like a global variable set in the event handler
> -requires atomic ops-)
Thank you for the patch. I will try to get that integrated sometime today. I'll be traveling for the next few days and will have limited ability during that time to address further concerns.
Automatic vs. manual reset were based on my thinking about whether the function WCMD_ctrlc_status would be called more than once per command iteration. If called only once then ownership of the status passes to the caller and thus automatic reset is cleaner. However, thinking further about this, it probably makes sense to switch back to manual reset, in case future callers (i.e. perhaps for different internal commands, etc.) might want to call it more than once per iteration. That, and the fact that there is a manual reset anyway before command launch in the loop toward the end of wmain suggests that a manual reset would be better, so I will switch back when I submit the changes containing your patch.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7322#note_94891
[View Less]
thanks for taking the time to update your patch
unfortunately, it fails on wine regression test
the attached patch should solve this
[patch.ctrlc](/uploads/84ae84d1c5cf3d3dfc19904c673bc906/patch.ctrlc)
also, any reason you changed the ctrl event for and automatic reset?
actually, I was puzzled with the previous versions with a manual reset (my first guess would have been to implement it with an automatic reset)
I tried things like '(dir /s \\\* || echo aaaaa) && dir \*' (and …
[View More]halting the first dir command with ctrl-c) on native:
* does break the first dir command,
* executes the RHS of || (as the dir command failed because of the ctrl-c),
* prints the 'aaaaa' string
* executes the RHS of && (as last command of LHS, eg echo, did succeed),
* outputs just the directory header (but nothing else) for the second dir
which fits better with a manual reset (it could be implemented in native with something else, like a global variable set in the event handler -requires atomic ops-)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7322#note_94879
[View Less]
This adds Mach thread priority support (both in the application and realtime band) and recalculates thread priorities when the process priority changes.
Part 3, which is still a bit WIP deals with implementing priority boosts (for main threads and threads which are processing window messages), effectively fully replacing https://gitlab.winehq.org/wine/wine/-/merge_requests/1232.
Currently the implementation in this MR already technically overrides what https://gitlab.winehq.org/wine/wine/-/…
[View More]merge_requests/1232 does, if it makes sense I can also revert it here.
I added a few comments regarding the Mach thread priority API usage, as there is limited documentation available, and much was inferred from the source or by testing. If this is too verbose I can also remove that...
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7317
[View Less]
I don't think these are serious problems, but Clang 20's defaults (from llvm-mingw nightly) were resulting in build failures with `--enable-werror` due to `-Wtautological-compare` and `-Wunused-function`. I hope that the buffer wrap checking is somewhat idiomatic/standard.
If necessary, I can split off the winevulkan change, but it seems minor enough to be grouped in this MR.
--
v2: rpcrt4: Pointer arithmetic fixes (-Wtautological-compare).
https://gitlab.winehq.org/wine/wine/-/merge_requests/7231
This fixes https://bugs.winehq.org/show_bug.cgi?id=52094.
For reference, here's how current_modref is being passed around (before this patch):
```mermaid
graph TB
fii["fixup_imports_ilonly<br><em style='color:#ff0'>(directly sets current_modref)</em>"]
fi["fixup_imports<br><em style='color:#ff0'>(directly sets current_modref)</em>"]
pa["process_attach<br><em style='color:#ff0'>(directly sets current_modref)</em>"]
ld[…
[View More]load_dll]
id["import_dll<br><em style='color:#0f0'>(directly uses current_modref)</em>"]
bin["build_import_name<br><em style='color:#0f0'>(directly uses current_modref)</em>"]
foe["find_ordinal_export<br><em style='color:#0f0'>(uses current_modref for relay)</em>"]
ffe["find_forwarded_export<br><em style='color:#0f0'>(directly uses current_modref)</em>"]
fne[find_named_export]
MI[MODULE_InitDLL]
fii --> ld
fi --> id
pa --> MI -.-> DllMain
id --> bin
id --> ld
id --> foe
id --> fne --> foe --> ffe --> foe
ffe --> fne
ffe --> bin
style DllMain color:red;
```
--
v12: ntdll: Remove superflous NULL check for importer.
ntdll: Properly track refcount on dynamic imports of export forwarders.
ntdll: Explicitly ignore dynamic (GetProcAddress) importers as relay/snoop user module.
ntdll: Properly track refcount on static imports of export forwarders.
ntdll: Register module dependency for export forwarders regardless of whether the dependency is already loaded.
ntdll: Don't re-add a module dependency if it already exists.
ntdll: Register module dependency for export forwarders only after successful resolution.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7
[View Less]
This resolves the issue in StudioTax where the bounding box dimensions is reported as 0.
Because the height is less than 0, the check for height in GdipAddPathRectangle fails,
and the X and Y coordinates of the points is never set.
I am fairly ignorant of this code, this seems like a good approach, however I am happy for guidance from others more familiar in how gdiplus works.
--
v3: gdiplus: Fix text height calculation when exceeding rect
gdiplus: Check for NoClip in text height …
[View More]calculation
https://gitlab.winehq.org/wine/wine/-/merge_requests/5360
[View Less]
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
v3: windowscodecs: Implement CreateQueryWriter().
windowscodecs/metadata: Base returned query handlers on metadata handlers.
windowscodecs/metadata: Return query writer object from GetMetadataByName() when block writer is used.
windowscodecs/metadata: Handle empty items in queries.
windowscodecs/metadata: Use separate helpers to parse query items.
windowscodecs/metadata: Add a helper to parse query …
[View More]index syntax.
windowscodecs/metadata: Collect query components before assigning values.
windowscodecs/metadata: Use VT_LPWSTR type instead of BSTRs when parsing queries.
windowscodecs/tests: Add some tests for the query reader container format.
windowscodecs/tests: Add some tests for CreateQueryWriterFromReader().
windowscodecs/tests: Add query reader tests for live block reader updates.
windowscodecs/tests: Add some tests for CreateQueryWriter().
windowscodecs/metadata: Share implementation between query reader and writer objects.
windowscodecs/tests: Add some query tests with the Unknown reader.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7329
[View Less]
On Sun Feb 16 17:41:01 2025 +0000, Brendan Shanks wrote:
> Another possibility is to use `libbsdxml`, a renamed expat that FreeBSD
> includes (although the man page says that “The libbsdxml library is
> intended to be used within the FreeBSD base system only. Use of the
> libbsdxml library for other purposes is not supported and discouraged.”
> But expat’s API is quite stable, and avahi also has the option to use bsdxml.)
> Otherwise, maybe just depend on a system-installed …
[View More]expat or libxml2 on FreeBSD?
Assuming this is desirable to read this file to begin with (e.g. if it's going to stay available in the future, if structure is stable, etc), we could potentially convert to WCHARs, and then reused much of existing code from manifest parsing. External library for something like seems heavy.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7339#note_94835
[View Less]
On Sun Feb 16 16:38:40 2025 +0000, eric pouech wrote:
> this likely could be folded in code line 510, by inserting between 510 & 511:
> if (return_code != NO_ERROR) dirStack = NULL;
Thank you. I knew this was non-optimal.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7322#note_94834
On Sun Feb 16 16:37:29 2025 +0000, eric pouech wrote:
> actually, we could (later on) have other values as return code...
> so IMO this should rather be written as:
> `if (return_code != NO_ERROR || (num_empty && !num_with_data))`
> ` errorlevel = ERROR_INVALID_FUNCTION;`
> `else`
> ` errorlevel = NO_ERROR;`
Thank you. I was hoping for clarification on this one.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7322#note_94833
On Sun Feb 16 16:38:49 2025 +0000, eric pouech wrote:
> nitpick: IMO it's more readable to return a RETURN_CODE, and pass a
> DIRECTORY_STACK\*\* to update the pointer (you likely did it this way to
> minimize change, but let's take the opportunity of a change to sanitize
> a bit the current spaghetti code)
It is *always* my philosophy to minimize changes to existing, working code. Some projects emphasize this. I also come from a working assumption, perhaps erroneously, that …
[View More]existing code is functional and already meets project standards. No one likes to come into a project to add contributions and then have to get out the mop bucket to clean up legacy technical debt. I'm speaking generally here and not specifically about this particular part of code.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7322#note_94832
[View Less]
On Sun Feb 16 17:01:28 2025 +0000, eric pouech wrote:
> globally it looks better
> a couple of stylistic remarks, but you need to go further for not using
> errorlevel inside the function and its helper
> perhaps, it's worthwhile to split the patch in two:
> * first one to no longer use error level internally, adapt
> list_directory prototype... (in the details, it's fine to use return
> errorlevel = ERROR\_\* while parsing the arguments in case of error, but
> when this …
[View More]is done all the rest of the code should use only the
> return_code (and set errorlevel when exiting WCMD_dir))
> * the second one to plug in the ctrl-c handling and breaking from the
> various loops
I only ever intended to do the second part. I've been doing the rest per your suggestions out of goodwill.
I'll continue to fix up the first part per your suggestions but I don't have the energy to split this into separate patches. I'll address the remaining issues that you have raised today but that's going to be it from me I'm afraid on this.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7322#note_94831
[View Less]
This introduces a faster implementation of signal and wait operations on NT
events, semaphores, and mutexes, which improves performance to native levels for
a wide variety of games and other applications.
The goal here is similar to the long-standing out-of-tree "esync" and "fsync"
patch sets, but without the flaws that make those patch sets not upstreamable.
The Linux "ntsync" driver is not currently released. It has been accepted into
the trunk Linux tree for 6.14, so barring any …
[View More]extraordinary circumstances, the
API is frozen and it will be released in its current form in about 2 months.
Since it has passed all relevant reviewers on the kernel side, and the API is
all but released, it seems there is no reason any more not to submit the Wine
side to match.
Some important notes:
* This patch set does *not* include any way to disable ntsync support, since
that kind of configuration often seems to be dispreferred where not necessary.
In essence, ntsync should just work everywhere.
Probably the easiest way to effectively disable ntsync, for the purposes of
testing, is to chmod the /dev/ntsync device to prevent its being opened.
Regardless, a Wine switch to disable ntsync can be added simply enough. Note
that it should probably not take the form of a registry key, however, since it
needs to be easily accessible from the server itself.
* It is, generally speaking, not possible for only some objects, or some
processes, to have backing ntsync objects, while others use the old server
path. The esync/fsync patch sets explicitly protected against this by making
sure every process had a consistent view of whether esync was enabled. This is
not provided here, since no switch is provided to toggle ntsync, and it should
not be possible to get into such an inconsistent state without gross
misconfiguration.
* Similarly, no diagnostic messages are provided to note that ntsync is in use,
or not in use. These messages are part of esync/fsync, as well as part of
ntsync "testing" trees unofficially distributed. However, if ntsync is working
correctly, no message should be necessary.
The basic structure is:
* Each type of server object which can be waited on by the client (including
events, semaphores, mutexes, but also other types such as processes, files)
must store an "inproc_sync" object.
This "inproc_sync" object is a full server object (note that this differs from
esync/fsync). A vector and server request is introduced to retrieve an NT
handle to this object from an arbitrary NT handle.
Since the actual ntsync objects are simply distinct file descriptions, we then
call get_handle_fd from the client to retrieve an fd to the object, and then
perform ioctls on it.
* Objects signaled by the server (processes, files, etc) perform ntsync ioctls
on that object. The backing object in all such cases is simply an event.
* Signal and wait operations on the client side attempt to defer to an
"inproc_\*" function, falling back to the server implementation if it returns
STATUS_NOT_IMPLEMENTED. This mirrors how in-process synchronization objects
(critical sections, SRW locks, etc) used to be implemented—attempting to use
an architecture-specific "fast_\*" function and falling back if it returned
STATUS_NOT_IMPLEMENTED.
* The inproc_sync handles, once retrieved, are cached per-process. This caching
takes a similar form to the fd cache. It does not reuse the same
infrastructure, however.
The primary reason for this is that the fd cache is designed to fit within a
64-bit value and uses 64-bit atomic operations to ensure consistency. However,
we need to store more than 64 bits of information. [We also need to modify
them after caching, in order to correctly implement handle closing—see below.]
The secondary reason is that retrieving the ntsync fd from the inproc_sync
handle itself uses the fd cache.
* In order to keep the Linux driver simple, it does not implement access flags
(EVENT_MODIFY_STATE etc.) Instead, the flags are cached locally and validated
there. This too mirrors the fd cache. Note that this means that a malicious
process can now modify objects it should not be able modify—which is less true
than it is with wineserver—but this is no different from the way other objects
(notably fds) are handled, and would require manual syscalls.
* In order to achieve correct behaviour related to closing objects while they
are used, this patch set essentially relies on refcounting. This is broadly
true of the server as well, but because we need to avoid server calls when
performing object operations, significantly more care must be taken.
In particular, because waits need to be interruptable by signals and then be
restarted, we need the backing ntsync object to remain valid until all users
are done with it. On a process level, this is achieved by letting multiple
processes own handles to the underlying inproc_sync server object.
On a thread level, multiple simultaneous calls need to refcount the process's
local handle. This refcount is stored in the sync object cache. When it
reaches zero, the cache is cleared.
Punting this behaviour to the Linux driver would have introduced a great deal
more complexity, which is best kept in userspace and out of the kernel.
* The cache is, as such, treated as a cache. The penultimate commit, which
introduces client support but does not yet cache the objects, effectively
illustrates this by never actually caching anything, and retrieving a new NT
handle and fd every time.
* Certain waits, on internal handles (such as async, startup_info, completion),
are delegated to the server even when ntsync is used. Those server objects do
not create an underlying ntsync object.
--
v3: ntdll: Cache in-process synchronization objects.
ntdll: Use server_wait_for_object() when waiting on only the queue object.
ntdll: Use in-process synchronization objects.
ntdll: Introduce a helper to wait on an internal server handle.
server: Allow creating an event object for client-side user APC signaling.
server: Introduce select_inproc_queue and unselect_inproc_queue requests.
server: Add a request to retrieve the in-process synchronization object from a handle.
server: Create in-process synchronization objects for fd-based objects.
server: Create in-process synchronization objects for timers.
server: Create in-process synchronization objects for threads.
server: Create in-process synchronization objects for message queues.
server: Create in-process synchronization objects for jobs.
server: Create in-process synchronization objects for processes.
server: Create in-process synchronization objects for keyed events.
server: Create in-process synchronization objects for device managers.
server: Create in-process synchronization objects for debug objects.
server: Create in-process synchronization objects for console servers.
server: Create in-process synchronization objects for consoles.
server: Create in-process synchronization objects for completion ports.
server: Create in-process synchronization objects for mutexes.
server: Create in-process synchronization objects for semaphores.
server: Create in-process synchronization objects for events.
server: Add an object operation to retrieve an in-process synchronization object.
ntdll: Retrieve and cache an ntsync device in wait calls.
ntdll: Add stub functions for in-process synchronization.
ntdll: Add some traces to synchronization methods.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7226
[View Less]
On Sun Feb 16 16:37:14 2025 +0000, eric pouech wrote:
> this shouldn't set errorlevel but return_code
> and likely using ERROR_FILE_NOT_FOUND to mark that listing was empty
My head is starting to spin here. That is existing code that I haven't touched. I'll fix along with the other issues though...
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7322#note_94829
Normally Cyberpunk 2077 spawns #cpu_threads of dispatcher threads.
However with Freebsd, since create_logical_proc_info was a stub,
the game would instead spawn a single dispatcher thread, causing
the game to just crawl.
Working around the issue by adding a barebone implementation of
create_logical_proc_info for FreeBSD so that the game would at
least get a thread count through ntdll.
--
v2: Fix Cyberpunk 2077 spawning only one dispatcher thread in FreeBSD
https://gitlab.winehq.org/wine/wine/-/merge_requests/5213
Another possibility is to use `libbsdxml`, a renamed expat that FreeBSD includes (although the man page says that “The libbsdxml library is intended to be used within the FreeBSD base system only. Use of the libbsdxml library for other purposes is not supported and discouraged.” But expat’s API is quite stable, and avahi also has the option to use bsdxml.)
Otherwise, maybe just depend on a system-installed expat or libxml2 on FreeBSD?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7339#note_94826