Alexandre Julliard : winex11: Export the TIMESTAMP clipboard property.

Alexandre Julliard julliard at winehq.org
Wed Sep 28 10:34:00 CDT 2016


Module: wine
Branch: master
Commit: 89f2dafe503d2f698327a9e2db87f38de90abff2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=89f2dafe503d2f698327a9e2db87f38de90abff2

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Sep 28 11:38:47 2016 +0900

winex11: Export the TIMESTAMP clipboard property.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 9c22f85..f56fd4f 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 116e9ae..5e8d85f 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 7e7835b..1c4ecfd 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",




More information about the wine-cvs mailing list