Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2bf890d9
Commit
2bf890d9
authored
Sep 14, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Return the owner window in the release_clipboard request.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c1f62c89
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
7 deletions
+16
-7
clipboard.c
dlls/user32/clipboard.c
+7
-3
server_protocol.h
include/wine/server_protocol.h
+2
-2
clipboard.c
server/clipboard.c
+4
-2
protocol.def
server/protocol.def
+1
-0
request.h
server/request.h
+1
-0
trace.c
server/trace.c
+1
-0
No files found.
dlls/user32/clipboard.c
View file @
2bf890d9
...
@@ -453,18 +453,22 @@ static UINT get_clipboard_flags(void)
...
@@ -453,18 +453,22 @@ static UINT get_clipboard_flags(void)
*/
*/
void
CLIPBOARD_ReleaseOwner
(
HWND
hwnd
)
void
CLIPBOARD_ReleaseOwner
(
HWND
hwnd
)
{
{
HWND
viewer
=
0
;
HWND
viewer
=
0
,
owner
=
0
;
SendMessageW
(
hwnd
,
WM_RENDERALLFORMATS
,
0
,
0
);
SendMessageW
(
hwnd
,
WM_RENDERALLFORMATS
,
0
,
0
);
SERVER_START_REQ
(
release_clipboard
)
SERVER_START_REQ
(
release_clipboard
)
{
{
req
->
owner
=
wine_server_user_handle
(
hwnd
);
req
->
owner
=
wine_server_user_handle
(
hwnd
);
if
(
!
wine_server_call
(
req
))
viewer
=
wine_server_ptr_handle
(
reply
->
viewer
);
if
(
!
wine_server_call
(
req
))
{
viewer
=
wine_server_ptr_handle
(
reply
->
viewer
);
owner
=
wine_server_ptr_handle
(
reply
->
owner
);
}
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
if
(
viewer
)
SendNotifyMessageW
(
viewer
,
WM_DRAWCLIPBOARD
,
(
WPARAM
)
GetClipboardOwner
()
,
0
);
if
(
viewer
)
SendNotifyMessageW
(
viewer
,
WM_DRAWCLIPBOARD
,
(
WPARAM
)
owner
,
0
);
}
}
...
...
include/wine/server_protocol.h
View file @
2bf890d9
...
@@ -4536,7 +4536,7 @@ struct release_clipboard_reply
...
@@ -4536,7 +4536,7 @@ struct release_clipboard_reply
{
{
struct
reply_header
__header
;
struct
reply_header
__header
;
user_handle_t
viewer
;
user_handle_t
viewer
;
char
__pad_12
[
4
]
;
user_handle_t
owner
;
};
};
...
@@ -6365,6 +6365,6 @@ union generic_reply
...
@@ -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 51
5
#define SERVER_PROTOCOL_VERSION 51
6
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/clipboard.c
View file @
2bf890d9
...
@@ -353,9 +353,11 @@ DECL_HANDLER(release_clipboard)
...
@@ -353,9 +353,11 @@ DECL_HANDLER(release_clipboard)
if
(
!
(
owner
=
get_valid_window_handle
(
req
->
owner
)))
return
;
if
(
!
(
owner
=
get_valid_window_handle
(
req
->
owner
)))
return
;
if
(
clipboard
->
owner_win
==
owner
)
if
(
clipboard
->
owner_win
==
owner
)
{
reply
->
viewer
=
release_clipboard
(
clipboard
);
reply
->
viewer
=
release_clipboard
(
clipboard
);
else
reply
->
owner
=
clipboard
->
owner_win
;
set_error
(
STATUS_INVALID_OWNER
);
}
else
set_error
(
STATUS_INVALID_OWNER
);
}
}
...
...
server/protocol.def
View file @
2bf890d9
...
@@ -3205,6 +3205,7 @@ enum caret_state
...
@@ -3205,6 +3205,7 @@ enum caret_state
user_handle_t owner; /* clipboard owner to release */
user_handle_t owner; /* clipboard owner to release */
@REPLY
@REPLY
user_handle_t viewer; /* first clipboard viewer */
user_handle_t viewer; /* first clipboard viewer */
user_handle_t owner; /* current clipboard owner */
@END
@END
...
...
server/request.h
View file @
2bf890d9
...
@@ -2046,6 +2046,7 @@ C_ASSERT( sizeof(struct empty_clipboard_request) == 16 );
...
@@ -2046,6 +2046,7 @@ C_ASSERT( sizeof(struct empty_clipboard_request) == 16 );
C_ASSERT
(
FIELD_OFFSET
(
struct
release_clipboard_request
,
owner
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
release_clipboard_request
,
owner
)
==
12
);
C_ASSERT
(
sizeof
(
struct
release_clipboard_request
)
==
16
);
C_ASSERT
(
sizeof
(
struct
release_clipboard_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
release_clipboard_reply
,
viewer
)
==
8
);
C_ASSERT
(
FIELD_OFFSET
(
struct
release_clipboard_reply
,
viewer
)
==
8
);
C_ASSERT
(
FIELD_OFFSET
(
struct
release_clipboard_reply
,
owner
)
==
12
);
C_ASSERT
(
sizeof
(
struct
release_clipboard_reply
)
==
16
);
C_ASSERT
(
sizeof
(
struct
release_clipboard_reply
)
==
16
);
C_ASSERT
(
sizeof
(
struct
get_clipboard_info_request
)
==
16
);
C_ASSERT
(
sizeof
(
struct
get_clipboard_info_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_clipboard_info_reply
,
window
)
==
8
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_clipboard_info_reply
,
window
)
==
8
);
...
...
server/trace.c
View file @
2bf890d9
...
@@ -3782,6 +3782,7 @@ static void dump_release_clipboard_request( const struct release_clipboard_reque
...
@@ -3782,6 +3782,7 @@ static void dump_release_clipboard_request( const struct release_clipboard_reque
static
void
dump_release_clipboard_reply
(
const
struct
release_clipboard_reply
*
req
)
static
void
dump_release_clipboard_reply
(
const
struct
release_clipboard_reply
*
req
)
{
{
fprintf
(
stderr
,
" viewer=%08x"
,
req
->
viewer
);
fprintf
(
stderr
,
" viewer=%08x"
,
req
->
viewer
);
fprintf
(
stderr
,
", owner=%08x"
,
req
->
owner
);
}
}
static
void
dump_get_clipboard_info_request
(
const
struct
get_clipboard_info_request
*
req
)
static
void
dump_get_clipboard_info_request
(
const
struct
get_clipboard_info_request
*
req
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment