user32: Fix returned class name for other process windows.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6dd9b83822
commit
7a45d2fa78
|
@ -1194,8 +1194,20 @@ INT WINAPI GetClassNameW( HWND hwnd, LPWSTR buffer, INT count )
|
|||
if (class == CLASS_OTHER_PROCESS)
|
||||
{
|
||||
WCHAR tmpbuf[MAX_ATOM_LEN + 1];
|
||||
ATOM atom = 0;
|
||||
|
||||
ret = GlobalGetAtomNameW( GetClassLongW( hwnd, GCW_ATOM ), tmpbuf, MAX_ATOM_LEN + 1 );
|
||||
SERVER_START_REQ( set_class_info )
|
||||
{
|
||||
req->window = wine_server_user_handle( hwnd );
|
||||
req->flags = 0;
|
||||
req->extra_offset = -1;
|
||||
req->extra_size = 0;
|
||||
if (!wine_server_call_err( req ))
|
||||
atom = reply->base_atom;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
||||
ret = GlobalGetAtomNameW( atom, tmpbuf, MAX_ATOM_LEN + 1 );
|
||||
if (ret)
|
||||
{
|
||||
ret = min(count - 1, ret);
|
||||
|
|
|
@ -4525,11 +4525,13 @@ struct set_class_info_reply
|
|||
{
|
||||
struct reply_header __header;
|
||||
atom_t old_atom;
|
||||
atom_t base_atom;
|
||||
mod_handle_t old_instance;
|
||||
lparam_t old_extra_value;
|
||||
unsigned int old_style;
|
||||
int old_extra;
|
||||
int old_win_extra;
|
||||
mod_handle_t old_instance;
|
||||
lparam_t old_extra_value;
|
||||
char __pad_44[4];
|
||||
};
|
||||
#define SET_CLASS_ATOM 0x0001
|
||||
#define SET_CLASS_STYLE 0x0002
|
||||
|
@ -6512,6 +6514,6 @@ union generic_reply
|
|||
struct terminate_job_reply terminate_job_reply;
|
||||
};
|
||||
|
||||
#define SERVER_PROTOCOL_VERSION 554
|
||||
#define SERVER_PROTOCOL_VERSION 555
|
||||
|
||||
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
||||
|
|
|
@ -276,6 +276,7 @@ DECL_HANDLER(set_class_info)
|
|||
reply->old_extra = class->nb_extra_bytes;
|
||||
reply->old_win_extra = class->win_extra;
|
||||
reply->old_instance = class->instance;
|
||||
reply->base_atom = class->base_atom;
|
||||
|
||||
if (req->flags & SET_CLASS_ATOM)
|
||||
{
|
||||
|
|
|
@ -3179,11 +3179,12 @@ enum caret_state
|
|||
lparam_t extra_value; /* value to set in extra bytes */
|
||||
@REPLY
|
||||
atom_t old_atom; /* previous class atom */
|
||||
atom_t base_atom; /* base class atom */
|
||||
mod_handle_t old_instance; /* previous module instance */
|
||||
lparam_t old_extra_value; /* old value in extra bytes */
|
||||
unsigned int old_style; /* previous class style */
|
||||
int old_extra; /* previous number of class extra bytes */
|
||||
int old_win_extra; /* previous number of window extra bytes */
|
||||
mod_handle_t old_instance; /* previous module instance */
|
||||
lparam_t old_extra_value; /* old value in extra bytes */
|
||||
@END
|
||||
#define SET_CLASS_ATOM 0x0001
|
||||
#define SET_CLASS_STYLE 0x0002
|
||||
|
|
|
@ -2056,12 +2056,13 @@ C_ASSERT( FIELD_OFFSET(struct set_class_info_request, extra_size) == 44 );
|
|||
C_ASSERT( FIELD_OFFSET(struct set_class_info_request, extra_value) == 48 );
|
||||
C_ASSERT( sizeof(struct set_class_info_request) == 56 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_class_info_reply, old_atom) == 8 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_class_info_reply, old_style) == 12 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_class_info_reply, old_extra) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_class_info_reply, old_win_extra) == 20 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_class_info_reply, old_instance) == 24 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_class_info_reply, old_extra_value) == 32 );
|
||||
C_ASSERT( sizeof(struct set_class_info_reply) == 40 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_class_info_reply, base_atom) == 12 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_class_info_reply, old_instance) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_class_info_reply, old_extra_value) == 24 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_class_info_reply, old_style) == 32 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_class_info_reply, old_extra) == 36 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_class_info_reply, old_win_extra) == 40 );
|
||||
C_ASSERT( sizeof(struct set_class_info_reply) == 48 );
|
||||
C_ASSERT( FIELD_OFFSET(struct open_clipboard_request, window) == 12 );
|
||||
C_ASSERT( sizeof(struct open_clipboard_request) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct open_clipboard_reply, owner) == 8 );
|
||||
|
|
|
@ -3795,11 +3795,12 @@ static void dump_set_class_info_request( const struct set_class_info_request *re
|
|||
static void dump_set_class_info_reply( const struct set_class_info_reply *req )
|
||||
{
|
||||
fprintf( stderr, " old_atom=%04x", req->old_atom );
|
||||
fprintf( stderr, ", base_atom=%04x", req->base_atom );
|
||||
dump_uint64( ", old_instance=", &req->old_instance );
|
||||
dump_uint64( ", old_extra_value=", &req->old_extra_value );
|
||||
fprintf( stderr, ", old_style=%08x", req->old_style );
|
||||
fprintf( stderr, ", old_extra=%d", req->old_extra );
|
||||
fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
|
||||
dump_uint64( ", old_instance=", &req->old_instance );
|
||||
dump_uint64( ", old_extra_value=", &req->old_extra_value );
|
||||
}
|
||||
|
||||
static void dump_open_clipboard_request( const struct open_clipboard_request *req )
|
||||
|
|
Loading…
Reference in New Issue