server: Store the clipboard windows as full handles.

This commit is contained in:
Alexandre Julliard 2015-06-03 18:38:23 +09:00
parent b8fac8adbf
commit e99c3f0c4b
1 changed files with 3 additions and 2 deletions

View File

@ -137,6 +137,7 @@ void cleanup_clipboard_thread(struct thread *thread)
static int open_clipboard( struct clipboard *clipboard, user_handle_t win ) static int open_clipboard( struct clipboard *clipboard, user_handle_t win )
{ {
win = get_user_full_handle( win );
if (clipboard->open_thread && clipboard->open_thread != current) if (clipboard->open_thread && clipboard->open_thread != current)
{ {
set_error(STATUS_WAS_LOCKED); set_error(STATUS_WAS_LOCKED);
@ -166,7 +167,7 @@ static int set_clipboard_owner( struct clipboard *clipboard, user_handle_t win )
set_error(STATUS_WAS_LOCKED); set_error(STATUS_WAS_LOCKED);
return 0; return 0;
} }
clipboard->owner_win = win; clipboard->owner_win = get_user_full_handle( win );
clipboard->owner_thread = current; clipboard->owner_thread = current;
return 1; return 1;
} }
@ -223,7 +224,7 @@ DECL_HANDLER(set_clipboard_info)
if (!release_clipboard_owner( clipboard )) return; if (!release_clipboard_owner( clipboard )) return;
} }
if (req->flags & SET_CB_VIEWER) clipboard->viewer = req->viewer; if (req->flags & SET_CB_VIEWER) clipboard->viewer = get_user_full_handle( req->viewer );
if (req->flags & SET_CB_SEQNO) clipboard->seqno++; if (req->flags & SET_CB_SEQNO) clipboard->seqno++;