From: Jiajin Cui <cuijiajin@uniontech.com> The clipboard format registration has been changed from NtAddAtom to NtUserRegisterWindowMessage to correctly handle system-wide clipboard format registration. Previously, using NtAddAtom would result in different format IDs for the same name caused by differences in implementation compared to the user32 module, leading to issues with data retrieval and corruption. --- dlls/winex11.drv/clipboard.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c index ee0015639b8..0e39e072067 100644 --- a/dlls/winex11.drv/clipboard.c +++ b/dlls/winex11.drv/clipboard.c @@ -286,11 +286,12 @@ static struct clipboard_format *find_x11_format( Atom atom ) } -static ATOM register_clipboard_format( const WCHAR *name ) +static ATOM register_clipboard_format(const WCHAR *name) { - ATOM atom; - if (NtAddAtom( name, lstrlenW( name ) * sizeof(WCHAR), &atom )) return 0; - return atom; + UNICODE_STRING str; + + RtlInitUnicodeString( &str, name ); + return NtUserRegisterWindowMessage( &str ); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10392