diff options
author | Alex Alexander <wired@gentoo.org> | 2012-01-02 13:25:59 +0000 |
---|---|---|
committer | Alex Alexander <wired@gentoo.org> | 2012-01-02 13:25:59 +0000 |
commit | acc915e96114e5d33cc638d0838891deff100002 (patch) | |
tree | 045e5e0b9ce4aed42c6e2fbc65827c6af12ca204 /x11-terms/rxvt-unicode | |
parent | Version bump (diff) | |
download | gentoo-2-acc915e96114e5d33cc638d0838891deff100002.tar.gz gentoo-2-acc915e96114e5d33cc638d0838891deff100002.tar.bz2 gentoo-2-acc915e96114e5d33cc638d0838891deff100002.zip |
added a -vanilla patch that fixes ctrl-l not storing cleared lines to buffer and a USE flag controlled patch (secondary-wheel) that allows scrolling in secondary screens (like mutt) by using the mouse wheel.
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
Diffstat (limited to 'x11-terms/rxvt-unicode')
-rw-r--r-- | x11-terms/rxvt-unicode/ChangeLog | 11 | ||||
-rw-r--r-- | x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-clear.patch | 25 | ||||
-rw-r--r-- | x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-secondary-wheel.patch | 123 | ||||
-rw-r--r-- | x11-terms/rxvt-unicode/metadata.xml | 2 | ||||
-rw-r--r-- | x11-terms/rxvt-unicode/rxvt-unicode-9.14.ebuild | 28 |
5 files changed, 182 insertions, 7 deletions
diff --git a/x11-terms/rxvt-unicode/ChangeLog b/x11-terms/rxvt-unicode/ChangeLog index 4cdb7a3ab0a3..f22bb3d58cbb 100644 --- a/x11-terms/rxvt-unicode/ChangeLog +++ b/x11-terms/rxvt-unicode/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for x11-terms/rxvt-unicode -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-terms/rxvt-unicode/ChangeLog,v 1.197 2011/12/27 20:47:33 jer Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/x11-terms/rxvt-unicode/ChangeLog,v 1.198 2012/01/02 13:25:59 wired Exp $ + + 02 Jan 2012; Alex Alexander <wired@gentoo.org> rxvt-unicode-9.14.ebuild, + +files/rxvt-unicode-9.14-clear.patch, + +files/rxvt-unicode-9.14-secondary-wheel.patch, metadata.xml: + added a -vanilla patch that fixes ctrl-l not storing cleared lines to buffer + and a USE flag controlled patch (secondary-wheel) that allows scrolling in + secondary screens (like mutt) by using the mouse wheel. 27 Dec 2011; Jeroen Roovers <jer@gentoo.org> rxvt-unicode-9.12-r1.ebuild: Stable for HPPA (bug #395703). diff --git a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-clear.patch b/x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-clear.patch new file mode 100644 index 000000000000..050907cea435 --- /dev/null +++ b/x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-clear.patch @@ -0,0 +1,25 @@ +store visible lines to buffer before clearing the screen when pressing ctrl-l + +patch by rlblaster +https://bbs.archlinux.org/viewtopic.php?id=129302 + +--- a/src/command.C ++++ b/src/command.C +@@ -2932,6 +2932,17 @@ + + case CSI_CUP: /* 8.3.21: (1,1) CURSOR POSITION */ + case CSI_HVP: /* 8.3.64: (1,1) CHARACTER AND LINE POSITION */ ++ if (nargs == 1 && current_screen == 0) ++ { ++ // This is usually followed with clear screen so add some extra ++ // lines to avoid deleting the lines already on screen. If we are ++ // already at the top, add an extra screen height of lines. ++ int extra_lines = nrow-1; ++ if (screen.cur.row == 0) ++ extra_lines += nrow; ++ for (int i = 0; i < extra_lines; ++i) ++ scr_add_lines (L"\r\n", 2); ++ } + scr_gotorc (arg[0] - 1, nargs < 2 ? 0 : (arg[1] - 1), 0); + break; + diff --git a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-secondary-wheel.patch b/x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-secondary-wheel.patch new file mode 100644 index 000000000000..1ed8904f493b --- /dev/null +++ b/x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-secondary-wheel.patch @@ -0,0 +1,123 @@ +secondary wheel support: +when using the mouse wheel, if you’re on secondary screen then no scrolling +will occur, and instead some (3, to be exact) “fake” keystrokes will be sent to +the running application. + +patch by jacky +i.am.jack.mail@gmail.com +http://lists.schmorp.de/pipermail/rxvt-unicode/2011q4/001491.html + +diff -r d5f9ea7306c4 -r cca1997c1a85 doc/rxvt.1.pod +--- a/doc/rxvt.1.pod Wed Dec 21 22:59:04 2011 +0100 ++++ b/doc/rxvt.1.pod Wed Dec 21 23:01:28 2011 +0100 +@@ -455,6 +455,11 @@ + Turn on/off secondary screen scroll (default enabled); resource + B<secondaryScroll>. + ++=item B<-ssw>|B<+ssw> ++ ++Turn on/off secondary screen wheel support (default disabled); resource ++B<secondaryWheel>. ++ + =item B<-hold>|B<+hold> + + Turn on/off hold window after exit support. If enabled, @@RXVT_NAME@@ +@@ -1167,6 +1172,13 @@ + scrollback buffer and, when secondaryScreen is off, switching + to/from the secondary screen will instead scroll the screen up. + ++=item B<secondaryWheel:> I<boolean> ++ ++Turn on/off secondary wheel (default disabled). If enabled, when on ++secondary screen, using the mouse wheel will not scroll in the buffer ++but instead send 3 "fake" keystrokes (Up/Down arrow) to the running ++application (allows e.g. natural scrolling in B<man>, B<less>, etc). ++ + =item B<hold>: I<boolean> + + Turn on/off hold window after exit support. If enabled, @@RXVT_NAME@@ +diff -r d5f9ea7306c4 -r cca1997c1a85 src/command.C +--- a/src/command.C Wed Dec 21 22:59:04 2011 +0100 ++++ b/src/command.C Wed Dec 21 23:01:28 2011 +0100 +@@ -2197,10 +2197,46 @@ + } + else + # endif ++#ifndef NO_SECONDARY_SCREEN + { +- scr_page (v, i); +- scrollBar.show (1); ++ /* on SECONDARY screen, we send "fake" UP/DOWN keys instead ++ * (this allows to scroll within man, less, etc) */ ++ if (option (Opt_secondaryWheel) && current_screen != PRIMARY) ++ { ++ XKeyEvent event; ++ event.display = ev.display; ++ event.window = ev.window; ++ event.root = ev.root; ++ event.subwindow = ev.subwindow; ++ event.time = ev.time; ++ event.x = ev.x; ++ event.y = ev.y; ++ event.x_root = ev.x_root; ++ event.y_root = ev.y_root; ++ event.same_screen = ev.same_screen; ++ event.state = 0; ++ event.keycode = XKeysymToKeycode(ev.display, ++ (v == UP) ? XK_Up : XK_Down); ++ for (i = 0; i < 3; ++i) ++ { ++ event.type = KeyPress; ++ XSendEvent (event.display, event.window, True, ++ KeyPressMask, (XEvent *) &event); ++ event.type = KeyRelease; ++ XSendEvent (event.display, event.window, True, ++ KeyPressMask, (XEvent *) &event); ++ } ++ } ++ /* on PRIMARY screen, we scroll in the buffer */ ++ else ++#endif ++ { ++ scr_page (v, i); ++ scrollBar.show (1); ++ } ++#ifndef NO_SECONDARY_SCREEN + } ++#endif + } + break; + #endif +diff -r d5f9ea7306c4 -r cca1997c1a85 src/optinc.h +--- a/src/optinc.h Wed Dec 21 22:59:04 2011 +0100 ++++ b/src/optinc.h Wed Dec 21 23:01:28 2011 +0100 +@@ -26,6 +26,7 @@ + def(cursorBlink) + def(secondaryScreen) + def(secondaryScroll) ++ def(secondaryWheel) + def(pastableTabs) + def(cursorUnderline) + #if ENABLE_FRILLS +diff -r d5f9ea7306c4 -r cca1997c1a85 src/rsinc.h +--- a/src/rsinc.h Wed Dec 21 22:59:04 2011 +0100 ++++ b/src/rsinc.h Wed Dec 21 23:01:28 2011 +0100 +@@ -102,6 +102,7 @@ + #ifndef NO_SECONDARY_SCREEN + def (secondaryScreen) + def (secondaryScroll) ++ def (secondaryWheel) + #endif + #ifdef OFF_FOCUS_FADING + def (fade) +diff -r d5f9ea7306c4 -r cca1997c1a85 src/xdefaults.C +--- a/src/xdefaults.C Wed Dec 21 22:59:04 2011 +0100 ++++ b/src/xdefaults.C Wed Dec 21 23:01:28 2011 +0100 +@@ -261,6 +261,7 @@ + #ifndef NO_SECONDARY_SCREEN + BOOL (Rs_secondaryScreen, "secondaryScreen", "ssc", Opt_secondaryScreen, 0, "enable secondary screen"), + BOOL (Rs_secondaryScroll, "secondaryScroll", "ssr", Opt_secondaryScroll, 0, "enable secondary screen scroll"), ++ BOOL (Rs_secondaryWheel, "secondaryWheel", "ssw", Opt_secondaryWheel, 0, "enable secondary screen wheel"), + #endif + #if ENABLE_PERL + RSTRG (Rs_perl_lib, "perl-lib", "string"), //, "colon-separated directories with extension scripts"),TODO diff --git a/x11-terms/rxvt-unicode/metadata.xml b/x11-terms/rxvt-unicode/metadata.xml index 7831a186da41..ba4ea3c8b296 100644 --- a/x11-terms/rxvt-unicode/metadata.xml +++ b/x11-terms/rxvt-unicode/metadata.xml @@ -24,6 +24,8 @@ <flag name='mousewheel'>Enable scrolling via mouse wheel or buttons 4 and 5</flag> <flag name='perl'>Enable perl script support. You can still disable this at runtime with -pe ""</flag> <flag name='pixbuf'>Enable transparency support using gtk's pixbuf</flag> +<flag name='secondary-wheel'>Support for wheel scrolling on secondary screens (like mutt). + Read http://lists.schmorp.de/pipermail/rxvt-unicode/2011q4/001491.html</flag> <flag name='unicode3'>Use 21 instead of 16 bits to represent unicode characters</flag> <flag name='wcwidth'>Enable wide char width support</flag> </use> diff --git a/x11-terms/rxvt-unicode/rxvt-unicode-9.14.ebuild b/x11-terms/rxvt-unicode/rxvt-unicode-9.14.ebuild index 926c9f8201b1..f68202870964 100644 --- a/x11-terms/rxvt-unicode/rxvt-unicode-9.14.ebuild +++ b/x11-terms/rxvt-unicode/rxvt-unicode-9.14.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-terms/rxvt-unicode/rxvt-unicode-9.14.ebuild,v 1.2 2011/12/23 17:37:18 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-terms/rxvt-unicode/rxvt-unicode-9.14.ebuild,v 1.3 2012/01/02 13:25:59 wired Exp $ EAPI="4" @@ -15,8 +15,8 @@ SLOT="0" KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris" IUSE=" 256-color alt-font-width afterimage blink +focused-urgency fading-colors - +font-styles iso14755 +mousewheel +perl pixbuf startup-notification truetype - unicode3 +vanilla wcwidth + +font-styles iso14755 +mousewheel +perl pixbuf secondary-wheel + startup-notification truetype unicode3 +vanilla wcwidth " RDEPEND=" @@ -37,7 +37,7 @@ DEPEND=" x11-proto/xproto " -REQUIRED_USE="vanilla? ( !alt-font-width focused-urgency !wcwidth )" +REQUIRED_USE="vanilla? ( !alt-font-width focused-urgency !secondary-wheel !wcwidth )" src_prepare() { # fix for prefix not installing properly @@ -62,6 +62,12 @@ src_prepare() { # bug #237271 epatch "${FILESDIR}"/${PN}-9.05_no-MOTIF-WM-INFO.patch + # support for wheel scrolling on secondary screens + use secondary-wheel && epatch "${FILESDIR}"/${P}-secondary-wheel.patch + + # ctrl-l buffer fix + epatch "${FILESDIR}"/${P}-clear.patch + use alt-font-width && epatch "${FILESDIR}"/${PN}-9.06-font-width.patch fi @@ -106,3 +112,15 @@ src_install() { cd "${S}"/doc dodoc README* changes.txt etc/* rxvt-tabbed } + +pkg_postinst() { + if use secondary-wheel; then + elog "You have enabled the secondary-wheel USE flag." + elog "This allows you to scroll in secondary screens" + elog "(like mutt's message list/view) using the mouse wheel." + elog + elog "To actually enable the feature you have to add" + elog " URxvt*secondaryWheel: true" + elog "in your ~/.Xdefaults file" + fi +} |