mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-08 13:48:03 +02:00
Try to close the clipboard if it is open before we try to open it.
This commit is contained in:
parent
c7b5484cfe
commit
0c4329a8c4
3 changed files with 19 additions and 1 deletions
|
|
@ -323,7 +323,13 @@ winClipboardWindowProc (HWND hwnd, UINT message,
|
|||
if (message == WM_RENDERALLFORMATS)
|
||||
{
|
||||
/* We must open and empty the clipboard */
|
||||
|
||||
|
||||
/* Close clipboard if we have it open already */
|
||||
if (GetOpenClipboardWindow () == hwnd)
|
||||
{
|
||||
CloseClipboard ();
|
||||
}
|
||||
|
||||
if (!OpenClipboard (hwnd))
|
||||
{
|
||||
ErrorF ("winClipboardWindowProc - WM_RENDER*FORMATS - "
|
||||
|
|
|
|||
|
|
@ -459,6 +459,12 @@ winProcSetSelectionOwner (ClientPtr client)
|
|||
goto winProcSetSelectionOwner_Done;
|
||||
}
|
||||
|
||||
/* Close clipboard if we have it open already */
|
||||
if (GetOpenClipboardWindow () == g_hwndClipboard)
|
||||
{
|
||||
CloseClipboard ();
|
||||
}
|
||||
|
||||
/* Access the Windows clipboard */
|
||||
if (!OpenClipboard (g_hwndClipboard))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -193,6 +193,12 @@ winClipboardFlushXEvents (HWND hwnd,
|
|||
goto winClipboardFlushXEvents_SelectionRequest_Done;
|
||||
}
|
||||
|
||||
/* Close clipboard if we have it open already */
|
||||
if (GetOpenClipboardWindow () == hwnd)
|
||||
{
|
||||
CloseClipboard ();
|
||||
}
|
||||
|
||||
/* Access the clipboard */
|
||||
if (!OpenClipboard (hwnd))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue