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.
--
v9: 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 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.
--
v8: 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
Sorry for the late review, I don't have any good excuse.
In general, these ioctls are a bit odd without the code on the bluetoothapis side to hook them up. It's probably reasonable to add those to this merge request.
From 1/4:
```
+NTSTATUS winebluetooth_radio_set_property( winebluetooth_radio_t radio,
+ winebluetooth_radio_props_mask_t prop,
+ union winebluetooth_property *property )
```
The "property" parameter is not used.
```
+ switch (prop)
+ {
+ case WINEBLUETOOTH_RADIO_PROPERTY_CONNECTABLE:
+ case WINEBLUETOOTH_RADIO_PROPERTY_DISCOVERABLE:
+ case WINEBLUETOOTH_RADIO_PROPERTY_PAIRABLE:
+ break;
+ default:
+ return STATUS_INVALID_PARAMETER;
+ }
```
The Unix side returns STATUS_INVALID_PARAMETER for the others anyway, so you might as well just get rid of this whole switch.
```
+ case LOCAL_RADIO_CONNECTABLE:
+ status =
+ winebluetooth_radio_set_property( ext->radio, WINEBLUETOOTH_RADIO_PROPERTY_CONNECTABLE, &prop_value );
+
+ break;
+ case LOCAL_RADIO_DISCOVERABLE:
+ status =
+ winebluetooth_radio_set_property( ext->radio, WINEBLUETOOTH_RADIO_PROPERTY_DISCOVERABLE, &prop_value );
+ break;
```
Why are we translating to a different flags enum? Why not pass this flag enum directly?
You also implement the PAIRABLE property, but that code is never reached.
```
+ status = UNIX_BLUETOOTH_CALL( bluetooth_adapter_set_prop, ¶ms );
+
+ if (status != STATUS_SUCCESS) return status;
+
+ return STATUS_SUCCESS;
```
This could just be "return UNIX_BLUETOOTH_CALL( ... )".
To each their own style, I guess, but in general there are a lot of helpers that seem quite redundant...
From 2/4:
```
+ if (filter->le && filter->bredr)
+ transport = WINEBLUETOOTH_DISCOVERY_TRANSPORT_AUTO;
+ else if (filter->le)
+ transport = WINEBLUETOOTH_DISCOVERY_TRANSPORT_LE;
+ else if (filter->bredr)
+ transport = WINEBLUETOOTH_DISCOVERY_TRANSPORT_BR_EDR;
+ else
+ transport = WINEBLUETOOTH_DISCOVERY_TRANSPORT_DEFAULT;
```
Why convert to an intermediate set of flags instead of just passing the params directly to the Unix side?
Aside from the fact that the bitfield might not work, but it's pretty unnecessary anyway.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7216#note_94694
64-bit volatile accesses are not atomic on i386. Both
i686-w64-mingw32-gcc and x86 MSVC splits 64-bit loads into a pair of
load/store ops.
Fix this by using a FILD/FISTP pair, which is also used to implement C11
atomics by i686-w64-mingw32-gcc.
Fixes: f82b1c1fcf770a5d6fa02c3f286282be79a201b8
--
v5: include: Prevent misuse of __WINE_ATOMIC_* helper macros for non-atomic large accesses.
server: Fix incorrect usage of __WINE_ATOMIC_STORE_RELEASE in SHARED_WRITE_BEGIN/SHARED_WRITE_END.
include: Fix ReadNoFence64 on i386.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7237
--
v5: server: Check for zero access in alloc_handle().
shell32: Don't open reg keys with zero access mask.
wbemprox: Don't open reg keys with zero access mask.
quartz: Don't open reg keys with zero access mask.
devenum: Don't open reg keys with zero access mask.
setupapi: Don't open reg keys with zero access mask.
kernel32: Don't open reg keys with zero access mask.
httpapi: Don't open files with zero access.
ntoskrnl.exe/tests: Open directory object with nonzero access in test_permanent().
https://gitlab.winehq.org/wine/wine/-/merge_requests/6047
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