server: Return the owner window in the close_clipboard request.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2bf890d95f
commit
305d89f1ed
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue