Alexandre Julliard : winex11: Periodically check for selection changes using a timer.
Alexandre Julliard
julliard at winehq.org
Tue Jan 10 15:24:42 CST 2017
Module: wine
Branch: master
Commit: d4f8366fa61b0f7a20b2b71272a40ef09e617140
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d4f8366fa61b0f7a20b2b71272a40ef09e617140
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Jan 10 16:23:37 2017 +0100
winex11: Periodically check for selection changes using a timer.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 8afe2c2..1d7dbad 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 );
More information about the wine-cvs
mailing list