diff options
author | dhn <dhn@FreeBSD.org> | 2011-06-20 22:50:22 +0800 |
---|---|---|
committer | dhn <dhn@FreeBSD.org> | 2011-06-20 22:50:22 +0800 |
commit | 0a236ec4f8405251cea04ce0f61b635f66e39049 (patch) | |
tree | f3c19d5a369d61f97094ea21918b9dcdd31c254c | |
parent | 54a3b744d03167ce9bc09b4634f2e9f83260e2aa (diff) | |
download | freebsd-ports-gnome-0a236ec4f8405251cea04ce0f61b635f66e39049.tar.gz freebsd-ports-gnome-0a236ec4f8405251cea04ce0f61b635f66e39049.tar.zst freebsd-ports-gnome-0a236ec4f8405251cea04ce0f61b635f66e39049.zip |
- Fix crash to paste from non-ICCCM clients
- Bump PORTREVISION
PR: ports/156544
Submitted by: Marcin Cieslak <saper@saper.info>
Approved by: maintainer
-rw-r--r-- | x11/rxvt-devel/Makefile | 2 | ||||
-rw-r--r-- | x11/rxvt-devel/files/patch-src-screen.c | 59 |
2 files changed, 56 insertions, 5 deletions
diff --git a/x11/rxvt-devel/Makefile b/x11/rxvt-devel/Makefile index bbee2f632ec8..8cf43a164ea6 100644 --- a/x11/rxvt-devel/Makefile +++ b/x11/rxvt-devel/Makefile @@ -9,7 +9,7 @@ PORTNAME= rxvt PORTVERSION= 2.7.10 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES+= x11 MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-dev/${PORTVERSION} PKGNAMESUFFIX= -devel diff --git a/x11/rxvt-devel/files/patch-src-screen.c b/x11/rxvt-devel/files/patch-src-screen.c index 990384c551c1..1691e3704745 100644 --- a/x11/rxvt-devel/files/patch-src-screen.c +++ b/x11/rxvt-devel/files/patch-src-screen.c @@ -1,11 +1,62 @@ --- src/screen.c.orig 2003-03-23 17:56:06.000000000 +0100 -+++ src/screen.c 2008-01-04 16:45:00.000000000 +0100 -@@ -3548,7 +3548,7 @@ ++++ src/screen.c 2011-04-19 23:27:32.000000000 +0200 +@@ -3520,6 +3520,7 @@ + Atom32 target_list[3]; + #endif + Atom target; ++ Atom property; + XTextProperty ct; + XICCEncodingStyle style; + char *cl[2], dummy[1]; +@@ -3532,6 +3533,15 @@ + ev.target = rq->target; + ev.time = rq->time; + ++ /* ICCCM: 2.2. Responsibilities of the Selection Owner ++ * SelectionRequest: ++ * If the specified property is None , the requestor ++ * an obsolete client. Owners are encouraged ++ * to support these clients by using the specified ++ * target atom as the property name to be used for ++ * the reply. ++ */ ++ property = (rq->property == 0) ? rq->target : rq->property; + if (rq->target == r->h->xa[XA_TARGETS]) { + target_list[0] = (Atom32) r->h->xa[XA_TARGETS]; + target_list[1] = (Atom32) XA_STRING; +@@ -3539,7 +3549,7 @@ + #ifdef USE_XIM + target_list[3] = (Atom32) r->h->xa[XA_COMPOUND_TEXT]; + #endif +- XChangeProperty(r->Xdisplay, rq->requestor, rq->property, XA_ATOM, ++ XChangeProperty(r->Xdisplay, rq->requestor, property, XA_ATOM, + (8 * sizeof(target_list[0])), PropModeReplace, + (unsigned char *)target_list, + (sizeof(target_list) / sizeof(target_list[0]))); +@@ -3547,10 +3557,10 @@ + } else if (rq->target == r->h->xa[XA_MULTIPLE]) { /* TODO: Handle MULTIPLE */ } else if (rq->target == r->h->xa[XA_TIMESTAMP] && r->selection.text) { - XChangeProperty(r->Xdisplay, rq->requestor, rq->property, XA_INTEGER, +- XChangeProperty(r->Xdisplay, rq->requestor, rq->property, XA_INTEGER, - (8 * sizeof(Time)), PropModeReplace, ++ XChangeProperty(r->Xdisplay, rq->requestor, property, XA_INTEGER, + 32, PropModeReplace, (unsigned char *)&r->h->selection_time, 1); - ev.property = rq->property; +- ev.property = rq->property; ++ ev.property = property; } else if (rq->target == XA_STRING + || rq->target == r->h->xa[XA_COMPOUND_TEXT] + || rq->target == r->h->xa[XA_TEXT]) { +@@ -3588,10 +3598,10 @@ + ct.value = (unsigned char *)cl[0]; + ct.nitems = selectlen; + } +- XChangeProperty(r->Xdisplay, rq->requestor, rq->property, ++ XChangeProperty(r->Xdisplay, rq->requestor, property, + target, 8, PropModeReplace, + ct.value, (int)ct.nitems); +- ev.property = rq->property; ++ ev.property = property; + #ifdef USE_XIM + if (freect) + XFree(ct.value); |