-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: bf82c5439d692e98acd5f0f5b751574b6ff538b7: path_to: revision_to:
commit bf82c5439d692e98acd5f0f5b751574b6ff538b7 Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com> Date: Sat Aug 16 10:51:23 2014 +0000 Add -mc option and multiClickTime resource, patch by Joe Peterson. diff --git a/Changes b/Changes
--- a/Changes +++ b/Changes @@ -37,6 +37,8 @@ TODO: document typical actions in rxvt.1.pod keysyms TODO: document meta comments and on_action hook TODO: perl one-liner + - Add -mc option and multiClickTime resource to set the maximum time + between multi-click select events (patch by Joe Peterson). - New 'eval' extension to evaluate arbitrary perl code with keysym bindings. The extension also provides methods that implement basic actions, such as pasting selections and scrolling. diff --git a/doc/rxvt.1.pod b/doc/rxvt.1.pod
--- a/doc/rxvt.1.pod +++ b/doc/rxvt.1.pod @@ -221,6 +221,10 @@ rather than the default executable file name. Name should not contain Start as a login-shell/sub-shell; resource B<loginShell>. +=item B<-mc> I<milliseconds> + +Specify the maximum time between multi-click selections. + =item B<-ut>|B<+ut> Compile I<utmp>: Inhibit/enable writing a utmp entry; resource @@ -788,6 +792,11 @@ B<True>: start as a login shell by prepending a `-' to B<argv[0]> of the shell; option B<-ls>. B<False>: start as a normal sub-shell [default]; option B<+ls>. +=item B<multiClickTime:> I<number> + +Specify the maximum time in milliseconds between multi-click select +events. The default is 500 milliseconds; option B<-mc>. + =item B<utmpInhibit:> I<boolean> B<True>: inhibit writing record into the system log file B<utmp>; diff --git a/src/command.C b/src/command.C
--- a/src/command.C +++ b/src/command.C @@ -1913,7 +1913,7 @@ rxvt_term::button_press (XButtonEvent &ev) } #endif - clickintime = ev.time - MEvent.time < MULTICLICK_TIME; + clickintime = ev.time - MEvent.time < multiClickTime; if (reportmode) { @@ -2173,7 +2173,7 @@ rxvt_term::button_release (XButtonEvent &ev) if (MEvent.button != AnyButton && (ev.button != MEvent.button || (ev.time - MEvent.time - > MULTICLICK_TIME / 2))) + > multiClickTime / 2))) { MEvent.clicks = 0; MEvent.button = AnyButton; diff --git a/src/command.h b/src/command.h
--- a/src/command.h +++ b/src/command.h @@ -7,9 +7,6 @@ #define ESC_ARGS 32 /* max # of args for esc sequences */ -#ifndef MULTICLICK_TIME -# define MULTICLICK_TIME 500 -#endif #ifndef SCROLLBAR_INITIAL_DELAY # define SCROLLBAR_INITIAL_DELAY 0.33 #endif diff --git a/src/init.C b/src/init.C
--- a/src/init.C +++ b/src/init.C @@ -662,6 +662,11 @@ rxvt_term::init_resources (int argc, const char *const *argv) pointerBlankDelay = 2; #endif + if (rs[Rs_multiClickTime] && (i = atoi (rs[Rs_multiClickTime])) >= 0) + multiClickTime = i; + else + multiClickTime = 500; + /* no point having a scrollbar without having any scrollback! */ if (!saveLines) set_option (Opt_scrollBar, 0); diff --git a/src/optinc.h b/src/optinc.h
--- a/src/optinc.h +++ b/src/optinc.h @@ -1,6 +1,7 @@ // all resource indices, used by rxvt.h and rxvtperl.xs def(loginShell) + def(multiClickTime) def(iconic) def(visualBell) def(mapAlert) diff --git a/src/rsinc.h b/src/rsinc.h
--- a/src/rsinc.h +++ b/src/rsinc.h @@ -22,6 +22,7 @@ def (backgroundPixmap) #endif def (loginShell) + def (multiClickTime) def (jumpScroll) def (skipScroll) def (scrollBar) diff --git a/src/rxvt.h b/src/rxvt.h
--- a/src/rxvt.h +++ b/src/rxvt.h @@ -1164,6 +1164,7 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen # ifdef POINTER_BLANK pointerBlankDelay, # endif + multiClickTime, allowedxerror; /* ---------- */ unsigned int ModLevel3Mask, diff --git a/src/xdefaults.C b/src/xdefaults.C
--- a/src/xdefaults.C +++ b/src/xdefaults.C @@ -101,6 +101,7 @@ optList[] = { SWCH ("dockapp", Opt_dockapp, 0, "start as dockapp"), BOOL (Rs_reverseVideo, "reverseVideo", "rv", Opt_reverseVideo, 0, "reverse video"), BOOL (Rs_loginShell, "loginShell", "ls", Opt_loginShell, 0, "login shell"), + STRG (Rs_multiClickTime, "multiClickTime", "mc", "number", "Maximum time (in ms) between multi-click selections"), BOOL (Rs_jumpScroll, "jumpScroll", "j", Opt_jumpScroll, 0, "jump scrolling"), BOOL (Rs_skipScroll, "skipScroll", "ss", Opt_skipScroll, 0, "skip scrolling"), BOOL (Rs_pastableTabs, "pastableTabs", "ptab", Opt_pastableTabs, 0, "tab characters are pastable"),
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 13:25:24 2024