server: Return the owner window in the close_clipboard request.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2016-09-14 15:29:03 +09:00
parent 2bf890d95f
commit 305d89f1ed
5 changed files with 10 additions and 10 deletions

View File

@ -546,8 +546,8 @@ BOOL WINAPI OpenClipboard( HWND hwnd )
*/
BOOL WINAPI CloseClipboard(void)
{
HWND viewer = 0;
BOOL ret, owner = FALSE;
HWND viewer = 0, owner = 0;
BOOL ret;
TRACE("() Changed=%d\n", bCBHasChanged);
@ -565,7 +565,7 @@ BOOL WINAPI CloseClipboard(void)
if ((ret = !wine_server_call_err( req )))
{
viewer = wine_server_ptr_handle( reply->viewer );
owner = reply->owner;
owner = wine_server_ptr_handle( reply->owner );
}
}
SERVER_END_REQ;
@ -574,10 +574,10 @@ BOOL WINAPI CloseClipboard(void)
if (bCBHasChanged)
{
if (owner) USER_Driver->pEndClipboardUpdate();
USER_Driver->pEndClipboardUpdate();
bCBHasChanged = FALSE;
}
if (viewer) SendNotifyMessageW( viewer, WM_DRAWCLIPBOARD, (WPARAM)GetClipboardOwner(), 0 );
if (viewer) SendNotifyMessageW( viewer, WM_DRAWCLIPBOARD, (WPARAM)owner, 0 );
return TRUE;
}

View File

@ -4483,7 +4483,7 @@ struct close_clipboard_reply
{
struct reply_header __header;
user_handle_t viewer;
int owner;
user_handle_t owner;
};
@ -6365,6 +6365,6 @@ union generic_reply
struct terminate_job_reply terminate_job_reply;
};
#define SERVER_PROTOCOL_VERSION 516
#define SERVER_PROTOCOL_VERSION 517
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */

View File

@ -293,7 +293,7 @@ DECL_HANDLER(close_clipboard)
if (req->changed) clipboard->seqno++;
reply->viewer = close_clipboard( clipboard );
reply->owner = (clipboard->owner_thread && clipboard->owner_thread->process == current->process);
reply->owner = clipboard->owner_win;
}

View File

@ -3171,7 +3171,7 @@ enum caret_state
int changed; /* did it change since the open? */
@REPLY
user_handle_t viewer; /* first clipboard viewer */
int owner; /* is the process already the owner? */
user_handle_t owner; /* current clipboard owner */
@END

View File

@ -3752,7 +3752,7 @@ static void dump_close_clipboard_request( const struct close_clipboard_request *
static void dump_close_clipboard_reply( const struct close_clipboard_reply *req )
{
fprintf( stderr, " viewer=%08x", req->viewer );
fprintf( stderr, ", owner=%d", req->owner );
fprintf( stderr, ", owner=%08x", req->owner );
}
static void dump_set_clipboard_info_request( const struct set_clipboard_info_request *req )