server: Get rid of the set_clipboard_info request.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2016-11-02 17:06:23 +01:00
parent 900366fd07
commit a5f42fcd6e
5 changed files with 1 additions and 122 deletions

View File

@ -4488,33 +4488,6 @@ struct close_clipboard_reply
struct set_clipboard_info_request
{
struct request_header __header;
unsigned int flags;
user_handle_t owner;
char __pad_20[4];
};
struct set_clipboard_info_reply
{
struct reply_header __header;
unsigned int flags;
user_handle_t old_clipboard;
user_handle_t old_owner;
user_handle_t old_viewer;
unsigned int seqno;
char __pad_28[4];
};
#define SET_CB_SEQNO 0x008
#define SET_CB_RELOWNER 0x010
#define CB_OPEN_ANY 0x020
#define CB_OPEN 0x040
#define CB_OWNER 0x080
#define CB_PROCESS 0x100
struct empty_clipboard_request
{
struct request_header __header;
@ -5792,7 +5765,6 @@ enum request
REQ_set_class_info,
REQ_open_clipboard,
REQ_close_clipboard,
REQ_set_clipboard_info,
REQ_empty_clipboard,
REQ_set_clipboard_data,
REQ_get_clipboard_data,
@ -6083,7 +6055,6 @@ union generic_request
struct set_class_info_request set_class_info_request;
struct open_clipboard_request open_clipboard_request;
struct close_clipboard_request close_clipboard_request;
struct set_clipboard_info_request set_clipboard_info_request;
struct empty_clipboard_request empty_clipboard_request;
struct set_clipboard_data_request set_clipboard_data_request;
struct get_clipboard_data_request get_clipboard_data_request;
@ -6372,7 +6343,6 @@ union generic_reply
struct set_class_info_reply set_class_info_reply;
struct open_clipboard_reply open_clipboard_reply;
struct close_clipboard_reply close_clipboard_reply;
struct set_clipboard_info_reply set_clipboard_info_reply;
struct empty_clipboard_reply empty_clipboard_reply;
struct set_clipboard_data_reply set_clipboard_data_reply;
struct get_clipboard_data_reply get_clipboard_data_reply;
@ -6442,6 +6412,6 @@ union generic_reply
struct terminate_job_reply terminate_job_reply;
};
#define SERVER_PROTOCOL_VERSION 522
#define SERVER_PROTOCOL_VERSION 523
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */

View File

@ -354,20 +354,6 @@ void cleanup_clipboard_thread(struct thread *thread)
release_object( winstation );
}
static int release_clipboard_owner( struct clipboard *clipboard, user_handle_t win )
{
if ((clipboard->open_thread && clipboard->open_thread->process != current->process) ||
(win && clipboard->owner_win != get_user_full_handle( win )))
{
set_win32_error( ERROR_CLIPBOARD_NOT_OPEN );
return 0;
}
clipboard->owner_win = 0;
clipboard->owner_thread = NULL;
return 1;
}
/* open the clipboard */
DECL_HANDLER(open_clipboard)
{
@ -408,33 +394,6 @@ DECL_HANDLER(close_clipboard)
}
DECL_HANDLER(set_clipboard_info)
{
struct clipboard *clipboard = get_process_clipboard();
if (!clipboard) return;
reply->old_clipboard = clipboard->open_win;
reply->old_owner = clipboard->owner_win;
reply->old_viewer = clipboard->viewer;
if (req->flags & SET_CB_RELOWNER)
{
if (!release_clipboard_owner( clipboard, req->owner )) return;
}
if (req->flags & SET_CB_SEQNO) clipboard->seqno++;
reply->seqno = clipboard->seqno;
if (clipboard->open_thread) reply->flags |= CB_OPEN_ANY;
if (clipboard->open_thread == current) reply->flags |= CB_OPEN;
if (clipboard->owner_thread == current) reply->flags |= CB_OWNER;
if (clipboard->owner_thread && clipboard->owner_thread->process == current->process)
reply->flags |= CB_PROCESS;
}
/* add a data format to the clipboard */
DECL_HANDLER(set_clipboard_data)
{

View File

@ -3174,26 +3174,6 @@ enum caret_state
@END
/* Set/get clipboard information */
@REQ(set_clipboard_info)
unsigned int flags; /* flags for fields to set (see below) */
user_handle_t owner; /* clipboard owner */
@REPLY
unsigned int flags; /* status flags (see below) */
user_handle_t old_clipboard; /* old clipboard window */
user_handle_t old_owner; /* old clipboard owner */
user_handle_t old_viewer; /* old clipboard viewer */
unsigned int seqno; /* current sequence number */
@END
#define SET_CB_SEQNO 0x008
#define SET_CB_RELOWNER 0x010
#define CB_OPEN_ANY 0x020
#define CB_OPEN 0x040
#define CB_OWNER 0x080
#define CB_PROCESS 0x100
/* Empty the clipboard and grab ownership */
@REQ(empty_clipboard)
@END

View File

@ -328,7 +328,6 @@ DECL_HANDLER(destroy_class);
DECL_HANDLER(set_class_info);
DECL_HANDLER(open_clipboard);
DECL_HANDLER(close_clipboard);
DECL_HANDLER(set_clipboard_info);
DECL_HANDLER(empty_clipboard);
DECL_HANDLER(set_clipboard_data);
DECL_HANDLER(get_clipboard_data);
@ -618,7 +617,6 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(req_handler)req_set_class_info,
(req_handler)req_open_clipboard,
(req_handler)req_close_clipboard,
(req_handler)req_set_clipboard_info,
(req_handler)req_empty_clipboard,
(req_handler)req_set_clipboard_data,
(req_handler)req_get_clipboard_data,
@ -2040,15 +2038,6 @@ C_ASSERT( sizeof(struct close_clipboard_request) == 16 );
C_ASSERT( FIELD_OFFSET(struct close_clipboard_reply, viewer) == 8 );
C_ASSERT( FIELD_OFFSET(struct close_clipboard_reply, owner) == 12 );
C_ASSERT( sizeof(struct close_clipboard_reply) == 16 );
C_ASSERT( FIELD_OFFSET(struct set_clipboard_info_request, flags) == 12 );
C_ASSERT( FIELD_OFFSET(struct set_clipboard_info_request, owner) == 16 );
C_ASSERT( sizeof(struct set_clipboard_info_request) == 24 );
C_ASSERT( FIELD_OFFSET(struct set_clipboard_info_reply, flags) == 8 );
C_ASSERT( FIELD_OFFSET(struct set_clipboard_info_reply, old_clipboard) == 12 );
C_ASSERT( FIELD_OFFSET(struct set_clipboard_info_reply, old_owner) == 16 );
C_ASSERT( FIELD_OFFSET(struct set_clipboard_info_reply, old_viewer) == 20 );
C_ASSERT( FIELD_OFFSET(struct set_clipboard_info_reply, seqno) == 24 );
C_ASSERT( sizeof(struct set_clipboard_info_reply) == 32 );
C_ASSERT( sizeof(struct empty_clipboard_request) == 16 );
C_ASSERT( FIELD_OFFSET(struct set_clipboard_data_request, format) == 12 );
C_ASSERT( FIELD_OFFSET(struct set_clipboard_data_request, lcid) == 16 );

View File

@ -3754,21 +3754,6 @@ static void dump_close_clipboard_reply( const struct close_clipboard_reply *req
fprintf( stderr, ", owner=%08x", req->owner );
}
static void dump_set_clipboard_info_request( const struct set_clipboard_info_request *req )
{
fprintf( stderr, " flags=%08x", req->flags );
fprintf( stderr, ", owner=%08x", req->owner );
}
static void dump_set_clipboard_info_reply( const struct set_clipboard_info_reply *req )
{
fprintf( stderr, " flags=%08x", req->flags );
fprintf( stderr, ", old_clipboard=%08x", req->old_clipboard );
fprintf( stderr, ", old_owner=%08x", req->old_owner );
fprintf( stderr, ", old_viewer=%08x", req->old_viewer );
fprintf( stderr, ", seqno=%08x", req->seqno );
}
static void dump_empty_clipboard_request( const struct empty_clipboard_request *req )
{
}
@ -4692,7 +4677,6 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(dump_func)dump_set_class_info_request,
(dump_func)dump_open_clipboard_request,
(dump_func)dump_close_clipboard_request,
(dump_func)dump_set_clipboard_info_request,
(dump_func)dump_empty_clipboard_request,
(dump_func)dump_set_clipboard_data_request,
(dump_func)dump_get_clipboard_data_request,
@ -4979,7 +4963,6 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
(dump_func)dump_set_class_info_reply,
(dump_func)dump_open_clipboard_reply,
(dump_func)dump_close_clipboard_reply,
(dump_func)dump_set_clipboard_info_reply,
NULL,
(dump_func)dump_set_clipboard_data_reply,
(dump_func)dump_get_clipboard_data_reply,
@ -5266,7 +5249,6 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"set_class_info",
"open_clipboard",
"close_clipboard",
"set_clipboard_info",
"empty_clipboard",
"set_clipboard_data",
"get_clipboard_data",
@ -5432,7 +5414,6 @@ static const struct
{ "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
{ "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
{ "PENDING", STATUS_PENDING },
{ "PIPE_BUSY", STATUS_PIPE_BUSY },
{ "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
{ "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
{ "PIPE_LISTENING", STATUS_PIPE_LISTENING },