On Thu Feb 13 16:48:27 2025 +0000, Brian Wright wrote:
> @rbernon On the client side, if you wanted to know why the log produces
> the values it has or had advice on code changes, the relevant file seems
> to be
> [yabridge/src/wine-host/editor.cpp](https://github.com/robbert-vdh/yabridge/…
> and a few routines responsible for coords and mouse handling that might
> be indirectly showing up in the bug report log include
> **is_cursor_in_wine_window** (line 1442),
> **get_current_pointer_position** (line 953), **fix_local_coordinates**
> (line 785), and `case XCB_CONFIGURE_NOTIFY` (line 552)
> I can attach to Wine and/or yabridge in a debugger, but I wouldn't have
> advice on what to change since I don't know how the handle relationships
> should look in order to find out which routine is producing incorrect
> coordinate offsets. If you want me to try anyway, I can put it in the
> queue of all the other stuff I forget to do once the workday is over.
> Thanks to you and @robbert-vdh for maintaining two phenomenal tools.
I updated the bug tracker again.
In REAPER, the window tree looks a bit like this:
```text
host_window_reparent parent 402, window 200192 (604,402)-(1516,1110)
host_window_reparent parent 200192, window 200193 (0,0)-(912,708) root_coords 1
host_window_reparent parent 200193, window 1600130 (0,0)-(912,708) root_coords 1
host_window_reparent parent 1600130, window 16012db (0,0)-(644,659) root_coords 1
host_window_reparent parent 16012db, window 2200000 (0,0)-(805,460) root_coords 1
host_window_reparent parent 2200000, window 2000003 (0,0)-(1920,1200) root_coords 0
```
I think 402, 200192, and 200193 are from REAPER and the rest from yabridge.
One detail I noticed is that window 2000003 gets the initial click event from yabridge and sends the correct value to **cursor:map_event_coords**. I don't know the structure of event->window, but there is something in [**host_window_configure_child**](https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/winex11.drv/window.c#L229) that messes with coordinate offsets.
Is is possible that **map_event_coords** should check the value of `root_coords` and provide `(pt->x, pt->y)` when this is 0?
I'll keep picking at things and see if there's more to find.
-----
Alternatively, a flag/argument solution would get DAW users back in action.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6569#note_94623
This MR tries to implement the SetIMECompositionRect user driver function and partially the WINE_IME_POST_UPDATE message call. It requires support for zwp_text_input_v3 from the compositor. It supports submitting committed text to the win32 side and notifying the compositor about the area of the text cursor rectangle.
This doesn't add support for embedded pre-edit because I couldn't immediately get it to appear. Either I did something incorrect, or it has something to do with Wayland. On X11, the pre-edit appears completely separated to the application window and doesn't move with it, which doesn't seem to be compatible with Wayland.
If Windows has the surrounding text feature, it does not seem possible to support it here with the provided interface.
The IME is always enabled on the focused surface, like on X11. If Windows has a facility that applications can use to say that it does or does not accept text entry at certain parts of the UI, it does not seem possible to support it here with the provided interface.
--
v6: winewayland: Post IME update for preedit text.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7241
This MR tries to implement the SetIMECompositionRect user driver function and partially the WINE_IME_POST_UPDATE message call. It requires support for zwp_text_input_v3 from the compositor. It supports submitting committed text to the win32 side and notifying the compositor about the area of the text cursor rectangle.
This doesn't add support for embedded pre-edit because I couldn't immediately get it to appear. Either I did something incorrect, or it has something to do with Wayland. On X11, the pre-edit appears completely separated to the application window and doesn't move with it, which doesn't seem to be compatible with Wayland.
If Windows has the surrounding text feature, it does not seem possible to support it here with the provided interface.
The IME is always enabled on the focused surface, like on X11. If Windows has a facility that applications can use to say that it does or does not accept text entry at certain parts of the UI, it does not seem possible to support it here with the provided interface.
--
v5: winewayland: Post IME update for preedit text.
winewayland: Implement SetIMECompositionRect.
winewayland: Post IME update for committed text.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7241
This allows using one single wineprefix, one wineserver and one single wine executable for running both arm and arm64 executables.
This setup actually has worked earlier; Ubuntu 22.04 packages Wine 6.0, where the wine32 + wine64 packages together end up working this way. However, since Wine 6.0, a couple of refactorings has broken this setup along the way; reinstate this way of working.
The new wow64 mode probably won't work on arm, as it's not easily possible to switch between 32 and 64 bit execution mode within a process, as far as I know, but the old wow64 mode is still a great convenience - especially considering distro-packaged use for users who aren't familiar with the particular quirks on this architecture.
--
v3: server: Include ARMNT as one of the supported architectures on aarch64
ntdll: Allow running arm/aarch64 in (old) wow64 mode
https://gitlab.winehq.org/wine/wine/-/merge_requests/7204
This MR adds clipboard support to the winewayland driver by using the wlr-data-control-unstable-v1 protocol. Note that this protocol was recently merged into wayland-protocols as ext-data-control-v1, but it's not yet widely supported, so I preferred to use the wlr version for now.
This MR has many similarities to https://gitlab.winehq.org/wine/wine/-/merge_requests/7236, but due to the unconstrained nature of wlr-data-control-unstable-v1 the implementation is simpler and more robust. It can neatly fit into the existing Wine clipboard design (single proxy window in the desktop process) without requiring any event forwarding etc.
Since wlr-data-control-unstable-v1/ext-data-control-v1 is considered privileged, it may not be available in all situations, e.g., in sandboxes, and there are also a couple of compositors that may not implement it at all. It is therefore useful to have a simple fallback using the core wl_data_device interface. This fallback is not part of this MR, but I have pushed a WIP implementation based on this MR at: https://gitlab.winehq.org/afrantzis/wine/-/commits/wayland-copy-paste-data-… (note: only the win32 -> wayland direction implemented at the moment). The new fallback approach is different from https://gitlab.winehq.org/wine/wine/-/merge_requests/7236 in that when using wl_data_device it creates per-process clipboard windows instead of forwarding messages from the desktop clipboard window. This allows it to work within the design of this MR with minimal changes and maximum code reuse.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7336
This MR tries to implement the SetIMECompositionRect user driver function and partially the WINE_IME_POST_UPDATE message call. It requires support for zwp_text_input_v3 from the compositor. It supports submitting committed text to the win32 side and notifying the compositor about the area of the text cursor rectangle.
This doesn't add support for embedded pre-edit because I couldn't immediately get it to appear. Either I did something incorrect, or it has something to do with Wayland. On X11, the pre-edit appears completely separated to the application window and doesn't move with it, which doesn't seem to be compatible with Wayland.
If Windows has the surrounding text feature, it does not seem possible to support it here with the provided interface.
The IME is always enabled on the focused surface, like on X11. If Windows has a facility that applications can use to say that it does or does not accept text entry at certain parts of the UI, it does not seem possible to support it here with the provided interface.
--
v4: winewayland: Post IME update for preedit text.
winewayland: Implement SetIMECompositionRect.
winewayland: Post IME update for committed text.
winewayland: Enable/disable the zwp_text_input_v3 object.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7241
When transitioning a window from IconicState to NormalState and the window is managed, go through
WithdrawnState. This is needed because Mutter doesn't unmap windows when making windows iconic/minimized
as Mutter needs to support live preview for minimized windows. So on Mutter, a window can be both
iconic and mapped. If the window is mapped, then XMapWindow() will have no effect according to the
XMapWindow() documentation. Thus we have to transition to WithdrawnState first, then to NormalState.
Fix Mass Effect Legendary Edition (1328670) starts minimized.
--
v2: winex11.drv: Go though WithdrawnState when transitioning from IconicState to NormalState.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7331
When transitioning a window from IconicState to NormalState and the window is managed, go through
WithdrawnState. This is needed because Mutter doesn't unmap windows when making windows iconic/minimized
as Mutter needs to support live preview for minimized windows. So on Mutter, a window can be both
iconic and mapped. If the window is mapped, then XMapWindow() will have no effect according to the
XMapWindow() documentation. Thus we have to transition to WithdrawnState first, then to NormalState.
Fix Mass Effect Legendary Edition (1328670) starts minimized.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7331
Allow the user to press Ctrl-C to abort lengthy DIR (or DIR /p, etc.) operations.
--
v2: programs/cmd: Implement ability to abort lengthy directory operations via Ctrl-C.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7322
These tests are for implementing encoding of sink writer. The implements MR is !7160, working in progress. Submitted the tests MR first.
--
v4: mfreadwrite/tests: Test sample processing for writer.
mfreadwrite/tests: Test AddStream and SetInputMediaType for writer.
mfreadwrite/tests: Test getting transforms and media sinks from writer.
mfreadwrite/tests: Move writer creation tests to test_sink_writer_create.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7125
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.
--
v24: dlls/oleaut32: Cannot allocate zero items on the heap
dlls/oleaut32: Avoid possible infinite loops and invalid mem access
dlls/oleaut32: Simplify loop in ITypeLib2_Constructor_MSFT()
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/7286
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.
--
v23: dlls/oleaut32: Cleanup IType__Impl_Constructor()s
dlls/oleaut32: Bound ITypeLib2_Constructor_SLTG() loop
dlls/oleaut32/connpt.c: Make consistent and validate args
dlls/oleaut32: Add missing IID case in ITypeLib2::QueryInterface()
dlls/oleaut32: Validate TLB_QueryInterface() params
dlls/oleaut32: Fix QueryInterface() to meet spec
dlls/shell32: Fix IUnknown::QueryInterface() to meet spec
dlls/oleaut32: Invert if-stmt in ITypeLib2_fnRelease()
dlls/oleaut32: Consistently use TLB_REF_NOT_FOUND
dlls/oleaut32: Validate arguments in ITypeLibComp interface
dlls/oleaut32: Validate arguments in ITypeComp interface
dlls/oleaut32: Consistently use TLB_get_bstr()
dlls/oleaut32: Invert if stmt for clarity
dlls/oleaut32: Fix nonsensical memory access in ITypeLib2_Constructor_SLTG()
dlls/oleaut32: Avoid ptr arithmetic in MSFT_DoVars()
dlls/oleaut32: Avoid ptr arithmetic in ITypeLib2_Constructor_SLTG()
dlls/oleaut32: Shink down ITypeLibComp_fnBind() verbosity some
dlls/oleaut32: ptr_size should be a ULONG
dlls/oleaut32: Scope indexer to loops in fn[Is|Find]Name()
dlls/oleaut32: Factor out TLB_get_funcparams_by_name()
dlls/oleaut32: Factor out TLB_get_funcdesc_by_name()
dlls/oleaut32: Validate args of ITypeLib2_fnIsName()
dlls/oleaut32: fn(Is|Find)Name should set szNameBuf with correct case
dlls/oleaut32: Use consistent param identifiers in fnFindName
dlls/oleaut32: Mostly mirror fnFindName impl in typelib.c
dlls/oleaut32: Use common and correct identifiers in typelib.c
dlls/oleaut32: Consistently use lstrcmpiW() while looking for names
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/7286