On Fri Feb 14 18:29:59 2025 +0000, eric pouech wrote:
> thanks for the update...
> that's better however, that's not exactly what should be done
> some background first:
> - cmd.exe for its builtin commands use a RETURN_CODE; this return code
> gets the status of the command execution (NO_ERROR success, error codes,
> but also propagating an 'EXIT /B' return value...)
> - each command eventually sets the ERRORLEVEL based on the RETURN_CODE
> (some builtin commands always do, some only do it in case of != 0 return
> code - and leave ERRORLEVEL untouched in case of success -, and some
> even have a different behavior if run from a .BAT or a .CMD command file)
> - the return code is used as a basis in command chaining (esp. && and ||
> with success/failure of LHS to decide or not to execute RHS)
> note: this some evolution in code base that has been started last year
> and the target is that all builtin implementation follow that scheme.
> not all of them have been fully migrated
> from what's tested DIR seem to always set the ERRORLEVEL to the
> return_code value (file not found...)
> but in case of ctrl-c, the return code shall be STATUS_CTRL_C_EXIT and
> errorlevel 1 (we'll need the return_code to be STATUS_CTRL_C_EXIT so
> that upper functions can decide to implement the 'Terminate batch job
> (Y/N)' at some point)
> so we globally need to invert the logic: in WCMD_dir and its helpers,
> always set the return_code, and set the errorlevel at WCMD_dir exit
> based on return_code value
> in this case, you should:
> - have a local var `RETURN_CODE return_code; `in WCMD_list_directory
> - use `return_code == NO_ERROR` to continue looping (and only this
> pattern as we could in later patches have more return codes stored in return_code)
> - and return the return_code from the helper into the WCMD_dir (which
> shall then break the loop, free all directory structures and finally set
> error level based on return code)
> simple test (by hand, should be harder to integrate in test suite):
> `dir /s \*.* || echo foobar`
> interrupt with ctrl-c, shall print `foobar` at the end
Looking through the existing code, especially WCMD_directory, there seems to be no distinction between errorlevel and the RETURN_CODE that the function returns. In most cases I see the code set errorlevel to some value and then the function returns errorlevel.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7322#note_94635
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.
--
v7: winewayland: Post IME update for preedit text.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7241
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
v2: windowscodecs: Implement CreateQueryWriter().
windowscodecs/metadata: Support creating query handlers over bare metadata handlers.
windowscodecs/metadata: Handle empty items in queries.
windowscodecs/metadata: Split up query parsing into helpers according to the query grammar.
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
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