WMSyncReader starts a background read thread that reads from the IStream
passed to IWMSyncReader::OpenStream. This means it could use the IStream in the
background even when no IWMSyncReader methods are being called.
For well-behaved applications, this is probably OK. However, AQUARIUM
(Steam 2515070) frees the IStream it passes to WMSyncReader _before_
it calls IWMSyncReader::Close, which stops the read thread. This causes
the read thread to access freed memory. This is improper, but not
unreasonable, as IWMSyncReader is supposed to be a synchronous
interface, so one might assume when they weren't calling into
IWMSyncReader methods, the IStream won't be used.
This commit adds a `wg_parser_dont_read` function, which can be used to
stop wg_parser from issuing read requests. This is used by IWMSyncReader
to make sure read requests are only issued when IWMSyncReader methods
are being called.
--
v4: winegstreamer: Make sure WMSyncReader never reads in the background.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7676
--
v6: amstream: Implement dynamic formats in ddraw stream.
amstream/tests: Test for dynamic formats in ddraw stream.
amstream: Implement custom allocator for ddraw stream.
amstream/tests: Test for custom allocator in ddraw stream.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7715
This fixes "out of realized font handles" errors seen with Valve games like Half-Life 2 (which uses more than 1000 font handles).
The new limit of 5000 is roughly inspired by the Windows limit, although there are differences. On Windows 11 I can call `CreateFont()` (and then `SetMapMode()`, `SelectObject()`, `SetTextAlign()` to realize the font) exactly 5000 times before it hits the handle limit.
Under Wine, child fonts use handles as well, so the limit is usually hit before 5000 `CreateFont()` calls. But, there is caching so that `CreateFont()` calls with identical arguments do not count towards the limit. Ultimately the old limit of 256 was sufficient for almost all applications, and 5000 should be enough for all but the worst-behaved apps.
--
v2: win32u: Make font handle table dynamically growable.
win32u: Track free font handles through indices instead of pointers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7771
This patch fixes a Japanese input issue in MS Office Visual Basic and Mery text
editor ime inline mode. The following was considered:
1. Japanese ime: the result string message is always placed between
WM_IME_STARTCOMPOSITION and WM_IME_ENDCOMPOSITION. Currently in Wine,
the result string message follows WM_IME_ENDCOMPOSITION.
dlls/imm32/tests/imm32.c::test_nihongo_no().
2. Chinese ime: same as Japanese ime.
3. Korean ime: mostly the same, but there are some cases where it is not
(e.g. CPS_COMPLETE, 'r-k-RETURN'). However, I haven't found any problem
even if it behave like Japanese ime message order.
3. zero-length preedit string: as in MR !3115 commit d1f9aae, the message
followed by WM_IME_ENDCOMPOSITION. Currently in Wine, it is associated
with WM_IME_STARTCOMPOSITION.
4. zero-length result string: ignore.
--
v2: imm32: Fix the WM_IME_COMPOSITION messages to be between the WM_IME_{START|END}COMPOSITION message.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7827
If CompAttr and CompClause are properly configured, Japanese input
will be more comfortable.
Inspired by cursor_begin and cursor_end from Wayland zwp_text_input_v3::
preedit_string, I extended the cursor_pos concept as follows:
cursor_pos = MAKELONG( cursor_begin, cursor_end );
ime_to_tascii_ex() uses this to construct CompAttr, CompClause.
MS Windows native CompAttr, CompClause is a bit more complicated
than this, but the concept is useful enough.
It requires additional implementation in the Wine ime_ui_window proc and
richedit control. However, it is useful for applications that inline ime
composition string.
This can be tested with MS Office Word, Excel. LANG=ja_JP.UTF-8 wine EXCEL.EXE
Test key sequences:
- “n-i-h-o-n-g-o-n-o-m-o-j-i-d-e-s-u-.-SPACE”.
- And, RIGHT, LEFT, Shift+LEFT, Shift+RIGHT, ESC, SPACE, etc.
--
v4: winex11: Update only when caret pos changed in xic_preedit_caret.
winex11: Extend cursor_pos using cursor_begin, cursor_end.
winemac: Extend cursor_pos using cursor_begin, cursor_end.
winewayland: Extend cursor_pos using cursor_begin, cursor_end.
win32u: Add more CompAttr, CompClause implementation using cursor_begin, cursor_end concept.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7812
This patch fixes a Japanese input issue in MS Office Visual Basic and Mery text
editor ime inline mode. The following was considered:
1. Japanese ime: the result string message is always placed between
WM_IME_STARTCOMPOSITION and WM_IME_ENDCOMPOSITION. Currently in Wine,
the result string message follows WM_IME_ENDCOMPOSITION.
dlls/imm32/tests/imm32.c::test_nihongo_no().
2. Chinese ime: same as Japanese ime.
3. Korean ime: mostly the same, but there are some cases where it is not
(e.g. CPS_COMPLETE, 'r-k-RETURN'). However, I haven't found any problem
even if it behave like Japanese ime message order.
3. zero-length preedit string: as in MR !3115 commit d1f9aae, the message
followed by WM_IME_ENDCOMPOSITION. Currently in Wine, it is associated
with WM_IME_STARTCOMPOSITION.
4. zero-length result string: ignore.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7827