* [gentoo-commits] gentoo-x86 commit in x11-terms/rxvt-unicode/files: rxvt-unicode-9.14-clear.patch rxvt-unicode-9.14-secondary-wheel.patch
@ 2012-01-02 13:25 Alex Alexander (wired)
0 siblings, 0 replies; only message in thread
From: Alex Alexander (wired) @ 2012-01-02 13:25 UTC (permalink / raw
To: gentoo-commits
wired 12/01/02 13:25:59
Added: rxvt-unicode-9.14-clear.patch
rxvt-unicode-9.14-secondary-wheel.patch
Log:
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)
Revision Changes Path
1.1 x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-clear.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-clear.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-clear.patch?rev=1.1&content-type=text/plain
Index: rxvt-unicode-9.14-clear.patch
===================================================================
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;
1.1 x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-secondary-wheel.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-secondary-wheel.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-secondary-wheel.patch?rev=1.1&content-type=text/plain
Index: rxvt-unicode-9.14-secondary-wheel.patch
===================================================================
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-01-02 13:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-02 13:25 [gentoo-commits] gentoo-x86 commit in x11-terms/rxvt-unicode/files: rxvt-unicode-9.14-clear.patch rxvt-unicode-9.14-secondary-wheel.patch Alex Alexander (wired)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox