Your message dated Thu, 4 Jan 2018 20:52:54 -0500
with message-id <[email protected]>
and subject line Closing
has caused the Debian Bug report #577036,
regarding rxvt: add selection TIMESTAMP support
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
577036: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=577036
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: rxvt
Version: 1:2.6.4-14
Severity: normal
Tags: patch

Some clients expect TIMESTAMP to be provided and misbehave otherwise.
Especially those that try to read the TIMESTAMP to determine if the
primary selection or clipboard should be read.



diff --git a/src/screen.c b/src/screen.c
index 6c78e08..193b33f 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -2894,6 +2894,7 @@ selection_clear(void)
        FREE(selection.text);
     selection.text = NULL;
     selection.len = 0;
+    selection.own_time = 0;
     CLEAR_SELECTION;
 }
 
@@ -2983,6 +2984,8 @@ selection_make(Time tm)
     XSetSelectionOwner(Xdisplay, XA_PRIMARY, TermWin.vt, tm);
     if (XGetSelectionOwner(Xdisplay, XA_PRIMARY) != TermWin.vt)
        print_error("can't get primary selection");
+    else
+       selection.own_time = tm;
     XChangeProperty(Xdisplay, Xroot, XA_CUT_BUFFER0, XA_STRING, 8,
                    PropModeReplace, selection.text, selection.len);
     D_SELECT((stderr, "selection_make(): selection.len=%d", selection.len));
@@ -3423,6 +3426,7 @@ selection_send(const XSelectionRequestEvent * rq)
     static Atom     xa_targets = None;
     static Atom     xa_compound_text = None;
     static Atom     xa_text = None;
+    static Atom     xa_timestamp = None;
     XTextProperty   ct;
     XICCEncodingStyle style;
     char           *cl[4];
@@ -3433,6 +3437,8 @@ selection_send(const XSelectionRequestEvent * rq)
        xa_compound_text = XInternAtom(Xdisplay, "COMPOUND_TEXT", False);
     if (xa_targets == None)
        xa_targets = XInternAtom(Xdisplay, "TARGETS", False);
+    if (xa_timestamp == None)
+       xa_timestamp = XInternAtom(Xdisplay, "TIMESTAMP", False);
 
     ev.xselection.type = SelectionNotify;
     ev.xselection.property = None;
@@ -3442,7 +3448,12 @@ selection_send(const XSelectionRequestEvent * rq)
     ev.xselection.target = rq->target;
     ev.xselection.time = rq->time;
 
-    if (rq->target == xa_targets) {
+    if (rq->target == xa_timestamp && selection.own_time) {
+       XChangeProperty(Xdisplay, rq->requestor, rq->property, XA_INTEGER,
+                       32, PropModeReplace,
+                       (unsigned char *)&selection.own_time, 1);
+       ev.xselection.property = rq->property;
+    } else if (rq->target == xa_targets) {
        target_list[0] = xa_targets;
        target_list[1] = XA_STRING;
        target_list[2] = xa_text;
diff --git a/src/screen.h b/src/screen.h
index 5c2fca5..13afa4c 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -83,6 +83,7 @@ typedef struct {
     short           screen;    /* screen being used                         */
     short           clicks;    /* number of clicks                          */
     row_col_t       beg, mark, end;
+    Time            own_time;   /* time of selection ownership               */
 } selection_t;
 
 typedef enum {
-- 
1.7.0


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.34-rc2 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages rxvt depends on:
ii  libc6                         2.10.2-6   Embedded GNU C Library: Shared lib
ii  libx11-6                      2:1.3.3-2  X11 client-side library
ii  libxpm4                       1:3.5.8-1  X11 pixmap library

rxvt recommends no packages.

rxvt suggests no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
Thank you for your bug report. As rxvt has been replaced by rxvt-unicode in
Debian, I am closing this bug. If you can still reproduce this bug with urxvt,
please feel free to reopen this bug and reassign it to the rxvt-unicode package.

Best wishes,
Ryan

-- 
|_)|_/  Ryan Kavanagh      | GPG: 4E46 9519 ED67 7734 268F
| \| \  https://ryanak.ca/ |      BD95 8F7B F8FC 4A11 C97A

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply via email to