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)
|
BOOL WINAPI CloseClipboard(void)
|
||||||
{
|
{
|
||||||
HWND viewer = 0;
|
HWND viewer = 0, owner = 0;
|
||||||
BOOL ret, owner = FALSE;
|
BOOL ret;
|
||||||
|
|
||||||
TRACE("() Changed=%d\n", bCBHasChanged);
|
TRACE("() Changed=%d\n", bCBHasChanged);
|
||||||
|
|
||||||
|
@ -565,7 +565,7 @@ BOOL WINAPI CloseClipboard(void)
|
||||||
if ((ret = !wine_server_call_err( req )))
|
if ((ret = !wine_server_call_err( req )))
|
||||||
{
|
{
|
||||||
viewer = wine_server_ptr_handle( reply->viewer );
|
viewer = wine_server_ptr_handle( reply->viewer );
|
||||||
owner = reply->owner;
|
owner = wine_server_ptr_handle( reply->owner );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SERVER_END_REQ;
|
SERVER_END_REQ;
|
||||||
|
@ -574,10 +574,10 @@ BOOL WINAPI CloseClipboard(void)
|
||||||
|
|
||||||
if (bCBHasChanged)
|
if (bCBHasChanged)
|
||||||
{
|
{
|
||||||
if (owner) USER_Driver->pEndClipboardUpdate();
|
USER_Driver->pEndClipboardUpdate();
|
||||||
bCBHasChanged = FALSE;
|
bCBHasChanged = FALSE;
|
||||||
}
|
}
|
||||||
if (viewer) SendNotifyMessageW( viewer, WM_DRAWCLIPBOARD, (WPARAM)GetClipboardOwner(), 0 );
|
if (viewer) SendNotifyMessageW( viewer, WM_DRAWCLIPBOARD, (WPARAM)owner, 0 );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4483,7 +4483,7 @@ struct close_clipboard_reply
|
||||||
{
|
{
|
||||||
struct reply_header __header;
|
struct reply_header __header;
|
||||||
user_handle_t viewer;
|
user_handle_t viewer;
|
||||||
int owner;
|
user_handle_t owner;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -6365,6 +6365,6 @@ union generic_reply
|
||||||
struct terminate_job_reply terminate_job_reply;
|
struct terminate_job_reply terminate_job_reply;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SERVER_PROTOCOL_VERSION 516
|
#define SERVER_PROTOCOL_VERSION 517
|
||||||
|
|
||||||
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
||||||
|
|
|
@ -293,7 +293,7 @@ DECL_HANDLER(close_clipboard)
|
||||||
if (req->changed) clipboard->seqno++;
|
if (req->changed) clipboard->seqno++;
|
||||||
|
|
||||||
reply->viewer = close_clipboard( clipboard );
|
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? */
|
int changed; /* did it change since the open? */
|
||||||
@REPLY
|
@REPLY
|
||||||
user_handle_t viewer; /* first clipboard viewer */
|
user_handle_t viewer; /* first clipboard viewer */
|
||||||
int owner; /* is the process already the owner? */
|
user_handle_t owner; /* current clipboard owner */
|
||||||
@END
|
@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 )
|
static void dump_close_clipboard_reply( const struct close_clipboard_reply *req )
|
||||||
{
|
{
|
||||||
fprintf( stderr, " viewer=%08x", req->viewer );
|
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 )
|
static void dump_set_clipboard_info_request( const struct set_clipboard_info_request *req )
|
||||||
|
|
Loading…
Reference in New Issue