From d4f8366fa61b0f7a20b2b71272a40ef09e617140 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 10 Jan 2017 16:23:37 +0100 Subject: [PATCH] winex11: Periodically check for selection changes using a timer. Signed-off-by: Alexandre Julliard --- dlls/winex11.drv/clipboard.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c index 8afe2c2a882..1d7dbad80f7 100644 --- a/dlls/winex11.drv/clipboard.c +++ b/dlls/winex11.drv/clipboard.c @@ -1852,6 +1852,7 @@ static BOOL request_selection_contents( Display *display, BOOL changed ) last_size = size; last_clipboard_update = GetTickCount64(); CloseClipboard(); + SetTimer( clipboard_hwnd, 1, SELECTION_UPDATE_DELAY, NULL ); return TRUE; } @@ -1888,9 +1889,14 @@ static LRESULT CALLBACK clipboard_wndproc( HWND hwnd, UINT msg, WPARAM wp, LPARA case WM_RENDERFORMAT: if (render_format( wp )) rendered_formats++; break; + case WM_TIMER: + if (!is_clipboard_owner) break; + request_selection_contents( thread_display(), FALSE ); + break; case WM_DESTROYCLIPBOARD: TRACE( "WM_DESTROYCLIPBOARD: lost ownership\n" ); is_clipboard_owner = FALSE; + KillTimer( hwnd, 1 ); break; } return DefWindowProcW( hwnd, msg, wp, lp ); -- 2.11.4.GIT