Francois Gouget : user32/tests: Protect OpenClipboard() from interference.

Alexandre Julliard julliard at winehq.org
Fri Jun 4 14:32:29 CDT 2021


Module: wine
Branch: master
Commit: 316eec8f6658a3776d3ae147baf5ade11e536116
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=316eec8f6658a3776d3ae147baf5ade11e536116

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Fri Jun  4 14:39:09 2021 +0200

user32/tests: Protect OpenClipboard() from interference.

Applications using ole32's clipboard API (e.g. Radeon / QT5) end up
monitoring the content of the clipboard and calling OpenClipboard()
while user32:clipboard runs. This causes the test's own
OpenClipboard() calls to fail.
Similarly the KDE clipboard manager may query the Wine clipboard
content while the test runs, causing winex11.drv to call
OpenClipboard() with the same effect.
So call OpenClipboard() again when it fails due to the clipboard
already being open. If opening the clipboard still fails, trace who
opened the clipboard, particularly the window class name to help
identify the source of interference.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/user32/tests/clipboard.c | 111 ++++++++++++++++++++++++++----------------
 1 file changed, 70 insertions(+), 41 deletions(-)

Diff:   https://source.winehq.org/git/wine.git/?a=commitdiff;h=316eec8f6658a3776d3ae147baf5ade11e536116



More information about the wine-cvs mailing list