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
ef837dbc
Commit
ef837dbc
authored
Sep 27, 2023
by
Esme Povirk
Committed by
Alexandre Julliard
Sep 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Use open_clipboard helper in msg tests.
parent
8d5d4136
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
msg.c
dlls/user32/tests/msg.c
+31
-1
No files found.
dlls/user32/tests/msg.c
View file @
ef837dbc
...
...
@@ -17623,11 +17623,41 @@ out_unregister:
UnregisterClassA
(
"TestDesktopClass"
,
instance
);
}
#define open_clipboard(hwnd) open_clipboard_(__LINE__, hwnd)
static
BOOL
open_clipboard_
(
int
line
,
HWND
hwnd
)
{
DWORD
start
=
GetTickCount
();
while
(
1
)
{
BOOL
ret
=
OpenClipboard
(
hwnd
);
if
(
ret
||
GetLastError
()
!=
ERROR_ACCESS_DENIED
)
return
ret
;
if
(
GetTickCount
()
-
start
>
100
)
{
char
classname
[
256
];
DWORD
le
=
GetLastError
();
HWND
clipwnd
=
GetOpenClipboardWindow
();
/* Provide a hint as to the source of interference:
* - The class name would typically be CLIPBRDWNDCLASS if the
* clipboard was opened by a Windows application using the
* ole32 API.
* - And it would be __wine_clipboard_manager if it was opened in
* response to a native application.
*/
GetClassNameA
(
clipwnd
,
classname
,
ARRAY_SIZE
(
classname
));
trace_
(
__FILE__
,
line
)(
"%p (%s) opened the clipboard
\n
"
,
clipwnd
,
classname
);
SetLastError
(
le
);
return
ret
;
}
Sleep
(
15
);
}
}
#define clear_clipboard(hwnd) clear_clipboard_(__LINE__, (hwnd))
static
void
clear_clipboard_
(
int
line
,
HWND
hWnd
)
{
BOOL
succ
;
succ
=
OpenClipboard
(
hWnd
);
succ
=
open_clipboard_
(
line
,
hWnd
);
ok_
(
__FILE__
,
line
)(
succ
,
"OpenClipboard failed, err=%lu
\n
"
,
GetLastError
());
succ
=
EmptyClipboard
();
ok_
(
__FILE__
,
line
)(
succ
,
"EmptyClipboard failed, err=%lu
\n
"
,
GetLastError
());
...
...
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