user32: Store the prev_unicode hook flag on the client side.

This commit is contained in:
Alexandre Julliard 2006-10-05 14:04:25 +02:00
parent ffa4e572ee
commit 533f519950
6 changed files with 25 additions and 24 deletions

View File

@ -359,11 +359,14 @@ static LRESULT call_hook( struct hook_info *info, INT code, WPARAM wparam, LPARA
{
struct user_thread_info *thread_info = get_user_thread_info();
HHOOK prev = thread_info->hook;
BOOL prev_unicode = thread_info->hook_unicode;
thread_info->hook = info->handle;
thread_info->hook_unicode = info->next_unicode;
ret = call_hook_proc( (HOOKPROC)info->proc, info->id, code, wparam, lparam,
info->prev_unicode, info->next_unicode );
thread_info->hook = prev;
thread_info->hook_unicode = prev_unicode;
}
}
return ret;
@ -537,12 +540,12 @@ LRESULT WINAPI CallNextHookEx( HHOOK hhook, INT code, WPARAM wparam, LPARAM lpar
info.pid = reply->pid;
info.tid = reply->tid;
info.proc = reply->proc;
info.prev_unicode = reply->prev_unicode;
info.next_unicode = reply->next_unicode;
info.next_unicode = reply->unicode;
}
}
SERVER_END_REQ;
info.prev_unicode = thread_info->hook_unicode;
return call_hook( &info, code, wparam, lparam );
}

View File

@ -167,19 +167,21 @@ struct hook16_queue_info;
/* no attempt is made to keep the layout compatible with the Windows one */
struct user_thread_info
{
HANDLE server_queue; /* 00 Handle to server-side queue */
DWORD recursion_count; /* 04 SendMessage recursion counter */
HHOOK hook; /* 08 Current hook */
struct received_message_info *receive_info; /* 0c Message being currently received */
struct hook16_queue_info *hook16_info; /* 10 Opaque pointer for 16-bit hook support */
DWORD GetMessageTimeVal; /* 14 Value for GetMessageTime */
DWORD GetMessagePosVal; /* 18 Value for GetMessagePos */
ULONG_PTR GetMessageExtraInfoVal; /* 1c Value for GetMessageExtraInfo */
HCURSOR cursor; /* 20 Current cursor */
INT cursor_count; /* 24 Cursor show count */
UINT active_hooks; /* 28 Bitmap of active hooks */
HWND desktop; /* 2c Desktop window */
/* 30-7c Available for more data */
HANDLE server_queue; /* Handle to server-side queue */
DWORD recursion_count; /* SendMessage recursion counter */
BOOL hook_unicode; /* Is current hook unicode? */
HHOOK hook; /* Current hook */
struct received_message_info *receive_info; /* Message being currently received */
struct hook16_queue_info *hook16_info; /* Opaque pointer for 16-bit hook support */
DWORD GetMessageTimeVal; /* Value for GetMessageTime */
DWORD GetMessagePosVal; /* Value for GetMessagePos */
ULONG_PTR GetMessageExtraInfoVal; /* Value for GetMessageExtraInfo */
HCURSOR cursor; /* Current cursor */
INT cursor_count; /* Cursor show count */
UINT active_hooks; /* Bitmap of active hooks */
HWND desktop; /* Desktop window */
ULONG pad[11]; /* Available for more data */
};
static inline struct user_thread_info *get_user_thread_info(void)

View File

@ -3392,8 +3392,7 @@ struct get_next_hook_reply
process_id_t pid;
thread_id_t tid;
void* proc;
int prev_unicode;
int next_unicode;
int unicode;
/* VARARG(module,unicode_str); */
};
@ -4426,6 +4425,6 @@ union generic_reply
struct query_symlink_reply query_symlink_reply;
};
#define SERVER_PROTOCOL_VERSION 252
#define SERVER_PROTOCOL_VERSION 253
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */

View File

@ -551,8 +551,7 @@ DECL_HANDLER(get_next_hook)
{
reply->next = next->handle;
reply->id = next->index + WH_MINHOOK;
reply->prev_unicode = hook->unicode;
reply->next_unicode = next->unicode;
reply->unicode = next->unicode;
if (next->module) set_reply_data( next->module, next->module_size );
if (run_hook_in_owner_thread( next ))
{

View File

@ -2382,8 +2382,7 @@ enum message_type
process_id_t pid; /* process id for low-level keyboard/mouse hooks */
thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
void* proc; /* next hook procedure */
int prev_unicode; /* was the previous a unicode hook? */
int next_unicode; /* is the next a unicode hook? */
int unicode; /* is it a unicode hook? */
VARARG(module,unicode_str); /* module name */
@END

View File

@ -2967,8 +2967,7 @@ static void dump_get_next_hook_reply( const struct get_next_hook_reply *req )
fprintf( stderr, " pid=%04x,", req->pid );
fprintf( stderr, " tid=%04x,", req->tid );
fprintf( stderr, " proc=%p,", req->proc );
fprintf( stderr, " prev_unicode=%d,", req->prev_unicode );
fprintf( stderr, " next_unicode=%d,", req->next_unicode );
fprintf( stderr, " unicode=%d,", req->unicode );
fprintf( stderr, " module=" );
dump_varargs_unicode_str( cur_size );
}