From 89f2dafe503d2f698327a9e2db87f38de90abff2 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 28 Sep 2016 11:38:47 +0900 Subject: [PATCH] winex11: Export the TIMESTAMP clipboard property. Signed-off-by: Alexandre Julliard --- dlls/winex11.drv/clipboard.c | 15 +++++++++++++++ dlls/winex11.drv/x11drv.h | 1 + dlls/winex11.drv/x11drv_main.c | 1 + 3 files changed, 17 insertions(+) diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c index 9c22f8597c9..f56fd4f2c0c 100644 --- a/dlls/winex11.drv/clipboard.c +++ b/dlls/winex11.drv/clipboard.c @@ -131,6 +131,7 @@ static BOOL export_text_html( Display *display, Window win, Atom prop, Atom targ static BOOL export_hdrop( Display *display, Window win, Atom prop, Atom target, HANDLE handle ); static BOOL export_targets( Display *display, Window win, Atom prop, Atom target, HANDLE handle ); static BOOL export_multiple( Display *display, Window win, Atom prop, Atom target, HANDLE handle ); +static BOOL export_timestamp( Display *display, Window win, Atom prop, Atom target, HANDLE handle ); static BOOL X11DRV_CLIPBOARD_ReadProperty( Display *display, Window w, Atom prop, Atom *type, unsigned char **data, unsigned long *datasize ); @@ -176,6 +177,7 @@ static const struct { HTMLFormatW, 0, XATOM_text_html, import_data, export_text_html }, { 0, 0, XATOM_TARGETS, import_targets, export_targets }, { 0, 0, XATOM_MULTIPLE, NULL, export_multiple }, + { 0, 0, XATOM_TIMESTAMP, NULL, export_timestamp }, }; static struct list format_list = LIST_INIT( format_list ); @@ -1552,6 +1554,19 @@ static BOOL export_multiple( Display *display, Window win, Atom prop, Atom targe } +/*********************************************************************** + * export_timestamp + * + * Export the timestamp that was used to acquire the selection + */ +static BOOL export_timestamp( Display *display, Window win, Atom prop, Atom target, HANDLE handle ) +{ + Time time = CurrentTime; /* FIXME */ + put_property( display, win, prop, XA_INTEGER, 32, &time, 1 ); + return TRUE; +} + + /************************************************************************** * X11DRV_CLIPBOARD_GetProperty * Gets type, data and size. diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 116e9aea762..5e8d85f949e 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -400,6 +400,7 @@ enum x11drv_atoms XATOM_SELECTION_DATA, XATOM_TARGETS, XATOM_TEXT, + XATOM_TIMESTAMP, XATOM_UTF8_STRING, XATOM_RAW_ASCENT, XATOM_RAW_DESCENT, diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index 7e7835b32f8..1c4ecfdc40b 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -111,6 +111,7 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] = "SELECTION_DATA", "TARGETS", "TEXT", + "TIMESTAMP", "UTF8_STRING", "RAW_ASCENT", "RAW_DESCENT", -- 2.11.4.GIT