This is not the right fix, and I need some help. Let me explain.
`session_submit_command` checks that:
1. `session->commands` is empty, and
2. `SESSION_FLAG_PENDING_COMMAND` is NOT set
before submitting the `session_op`. The assumption is, if there are queued commands, or if there is a command currently running, that pending command will submit subsequent commands when it completes.
However, in this call chain:
```
#0 0x00006fffe1d27ad7 in create_async_result (object=object@entry=0x0, callback=callback@entry=0x7e62489f1c08,
state=state@entry=0x7e61cb5322b0, out=out@entry=0x7e6242bac7a0) at ../dlls/rtworkq/queue.c:1229
#1 0x00006fffe1d222d5 in RtwqCreateAsyncResult (object=object@entry=0x0, callback=callback@entry=0x7e62489f1c08,
state=state@entry=0x7e61cb5322b0, out=out@entry=0x7e6242bac7a0) at ../dlls/rtworkq/queue.c:1245
#2 0x00006fffd45e2096 in MFPutWorkItem (queue=queue@entry=1, callback=callback@entry=0x7e62489f1c08,
state=state@entry=0x7e61cb5322b0) at ../dlls/mfplat/queue.c:46
#3 0x00006fffe41244ee in session_command_complete (session=0x7e62489f1be0) at ../dlls/mf/session.c:975
#4 0x00006fffe412d00f in session_reset (session=session@entry=0x7e62489f1be0) at ../dlls/mf/session.c:1051
#5 0x00006fffe41299fc in session_handle_source_shutdown (session=session@entry=0x7e62489f1be0)
at ../dlls/mf/session.c:2957
#6 0x00006fffe4126e90 in session_events_callback_Invoke (iface=0x7e62489f1c20, result=<optimized out>)
at ../dlls/mf/session.c:4445
```
nowhere was the `SESSION_FLAG_PENDING_COMMAND` flag set. In addition to that, `session_events_callback_Invoke` is not a command. So this could happend:
```
Thread 1 | Thread 2
call session_events_callback_Invoke |
| call session_submit_command
| <critical section>
| list_empty(&session->commands) is true, and PENDING_COMMAND not set
| MFPutWorkItem(op)
| list_add(&session->commands, op) <- (1)
| </critical_section>
call session_handle_source_shutdown |
<critical_section> |
call session_reset |
call session_command_complete |
list_head(&session->commands) |
op is returned because of (1) |
MFPutWorkItem(op) again |
</critical_section> |
```
The result is this op will be executed twice, and also double freed, because `session_commands_callback_Invoke` releases the `op`.
* * *
There is even another way an `op` can be submitted twice, `session_handle_start_error` calls `session_reset`, which already calls `session_command_complete`, and later it calls `session_command_complete_with_event` again. I think a missing return?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8270
Fix the rectangle from DrawText(..., DT_CALCRECT) with a selected font might not be enough to
actually draw text with the font for the EV Nova game.
This ensures that text extent calculated with a font selected in a device context is enough when
drawing texts using the same font and device context. The root cause is that FreeType might report
different font metrics for different GGO formats. GetTextExtentExPoint() gets text extent with
GGO_METRICS. And GGO_METRICS gets font metrics from glyphs loaded with FT_LOAD_TARGET_NORMAL, so
when drawing bitmap fonts, which is of GGO_BITMAP format loaded with FT_LOAD_TARGET_MONO, with the
calculated text extent, the result text might get truncated because of the font metrics difference.
On Windows, anti-aliased font and bitmap font of the same face font reports the same font metrics so
such a problem doesn't happen. The ultimate fix is to let FreeType hint the bitmap fonts with the
same font metrics as anti-aliased fonts but there are no settings that can achieve it unless we
write a new FreeType hinter.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57309
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8414
C99 checks depend on stddef.h and stdarg.h. Those headers are usually shipped with
compilers (and another copy of them as part of mingw-w64 for targets that use it),
but some providers skip them. We use our own version during the build anyway, so
we may use them for configure checks as well.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4642
--
v2: mf/tests: Add a test for source shutdown after setting the topology.
mf: Do not set the topo status if a source has been shut down.
mf: Propagate errors from session_collect_nodes() to the caller of session_set_current_topology().
https://gitlab.winehq.org/wine/wine/-/merge_requests/6986
Adds the tray icons implementation based on org.kde.StatusNotifierItem interface usage. Does allow restarting StatusNotifierWatcher object, but will fallback to XEMBED or internal tray, if wine gets initialized when there is no StatusNotifierWatcher object registered.
--
v41: win32u: Handle dbus notification balloons from system_tray_call
win32u: Handle notification balloons through org.freedesktop.Notifications dbus interface
win32u: Add a ShowBalloon driver interface
win32u: Handle StatusNotifierItem management from system_tray_call
win32u: Handle StatusNotifierWatcher owner changing and registering objects to a new watcher
win32u: Add SNI driver for systray handling
win32u: Add DBus event loop for SNI handling
win32u: Add a SystrayRunLoop driver interface
https://gitlab.winehq.org/wine/wine/-/merge_requests/2808
@alexhenrie @zhiyi
Description:
When flags does not include DT_CALCRECT, since len is calculated in the middle,
it will be reduced to zero. Resulting in the length of the processed string that
is finally returned to zero and the non-processing string length is unchanged.
But some application taking the non-processing string length to zero as the loop
end condition.
The test case's merge request number is 8177.
Signed-off-by: chenjiangyi <chenjiangyi(a)uniontech.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8178
This MR enforces alignment of TLS slots as described in PE file.
--
v4: ntdll: Let layout of TLS vector be closer to native.
ntdll: Enforce the alignment of TLS directory entries.
kernel32: Add test for TLS memory layout.
kernel32/tests: Add a test about TLS slot alignment.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7251