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