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
9c9ebe04
Commit
9c9ebe04
authored
Sep 23, 2009
by
Alexander Scott-Johns
Committed by
Alexandre Julliard
Sep 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Send a WM_DRAWCLIPBOARD message to the new viewer when SetClipboardViewer is called.
parent
64569c66
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
13 deletions
+21
-13
clipboard.c
dlls/user32/clipboard.c
+19
-11
msg.c
dlls/user32/tests/msg.c
+2
-2
No files found.
dlls/user32/clipboard.c
View file @
9c9ebe04
...
...
@@ -188,6 +188,21 @@ static BOOL CLIPBOARD_CloseClipboard(void)
return
bRet
;
}
static
HWND
CLIPBOARD_SetClipboardViewer
(
HWND
hWnd
)
{
HWND
hwndPrev
=
0
;
SERVER_START_REQ
(
set_clipboard_info
)
{
req
->
flags
=
SET_CB_VIEWER
;
req
->
viewer
=
wine_server_user_handle
(
hWnd
);
if
(
!
wine_server_call_err
(
req
))
hwndPrev
=
wine_server_ptr_handle
(
reply
->
old_viewer
);
}
SERVER_END_REQ
;
return
hwndPrev
;
}
/**************************************************************************
* WIN32 Clipboard implementation
...
...
@@ -390,17 +405,10 @@ HWND WINAPI GetOpenClipboardWindow(void)
*/
HWND
WINAPI
SetClipboardViewer
(
HWND
hWnd
)
{
HWND
hwndPrev
=
0
;
SERVER_START_REQ
(
set_clipboard_info
)
{
req
->
flags
=
SET_CB_VIEWER
;
req
->
viewer
=
wine_server_user_handle
(
hWnd
);
if
(
!
wine_server_call_err
(
req
))
hwndPrev
=
wine_server_ptr_handle
(
reply
->
old_viewer
);
}
SERVER_END_REQ
;
HWND
hwndPrev
=
CLIPBOARD_SetClipboardViewer
(
hWnd
);
if
(
hWnd
)
SendMessageW
(
hWnd
,
WM_DRAWCLIPBOARD
,
(
WPARAM
)
GetClipboardOwner
(),
0
);
TRACE
(
"(%p): returning %p
\n
"
,
hWnd
,
hwndPrev
);
return
hwndPrev
;
...
...
@@ -438,7 +446,7 @@ BOOL WINAPI ChangeClipboardChain(HWND hWnd, HWND hWndNext)
if
(
hWndViewer
)
{
if
(
WIN_GetFullHandle
(
hWnd
)
==
hWndViewer
)
SetClipboardViewer
(
WIN_GetFullHandle
(
hWndNext
));
CLIPBOARD_
SetClipboardViewer
(
WIN_GetFullHandle
(
hWndNext
));
else
bRet
=
!
SendMessageW
(
hWndViewer
,
WM_CHANGECBCHAIN
,
(
WPARAM
)
hWnd
,
(
LPARAM
)
hWndNext
);
}
...
...
dlls/user32/tests/msg.c
View file @
9c9ebe04
...
...
@@ -11813,7 +11813,7 @@ static void test_clipboard_viewers(void)
/* Test registering hWnd1 as a viewer. */
hRet
=
SetClipboardViewer
(
hWnd1
);
wm_clipboard_changed
[
0
].
wParam
=
(
WPARAM
)
GetClipboardOwner
();
ok_sequence
(
wm_clipboard_changed
,
"set viewer NULL->1"
,
TRU
E
);
ok_sequence
(
wm_clipboard_changed
,
"set viewer NULL->1"
,
FALS
E
);
expect_HWND
(
NULL
,
hRet
);
expect_HWND
(
hWnd1
,
GetClipboardViewer
());
...
...
@@ -11830,7 +11830,7 @@ static void test_clipboard_viewers(void)
/* Test re-registering same window. */
hRet
=
SetClipboardViewer
(
hWnd1
);
wm_clipboard_changed
[
0
].
wParam
=
(
WPARAM
)
GetClipboardOwner
();
ok_sequence
(
wm_clipboard_changed
,
"set viewer 1->1"
,
TRU
E
);
ok_sequence
(
wm_clipboard_changed
,
"set viewer 1->1"
,
FALS
E
);
expect_HWND
(
hWnd1
,
hRet
);
expect_HWND
(
hWnd1
,
GetClipboardViewer
());
...
...
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