[PATCH] Early hook invocation (was: Urxvt tabbed(ex) scroll doesn't work when mouse is not inside urxvt window)
Martin Pohlack
mp26 at os.inf.tu-dresden.de
Thu Mar 6 22:00:00 CET 2014
It usually is. The plugin should signal whether it consumed the event.
If that happened we should not continue to process it, otherwise funny
duplications could happen. All the plugins that I saw, almost always
signal consumptions.
Ignoring the return value will hand over the events twice to plugins (in
the later hook again). Dropping the return is more of a hack. I think
my reordering suggestion from the other email is a cleaner approach.
Martin
On 06.03.2014 21:54, Vas No Medas wrote:
> I've found that if remove this return:
>
> +++ command.C 2014-03-06 22:42:00.754173116 +0200
> @@ -410,10 +410,12 @@
> int valid_keysym;
> char kbuf[KBUFSZ];
>
> - // allow early handling of events for plugins
> - if (HOOK_INVOKE ((this, HOOK_KEY_PRESS, DT_XEVENT, &ev, DT_END)))
> - return;
> -
> + // allow early handling of events for plugins
> + if (HOOK_INVOKE ((this, HOOK_KEY_PRESS, DT_XEVENT, &ev, DT_END)))
> + ;
> +
> +
> +
> #if ISO_14755
> if (iso14755buf & ISO_14755_52)
> return;
>
> everything works OK - both scrolling without mouse focus and tabbedex
> renaming and url selecting.
>
> Is this return essential?
>
> On Thu, Mar 6, 2014 at 10:29 PM, Vas No Medas <vasnomedas at gmail.com
> <mailto:vasnomedas at gmail.com>> wrote:
>
> Hello!
>
> I've stumbled upon a little problem with using this patched urxvt.
> After installing urxvt-perls and using url-select plugin from there
> I've seen the following behaviour: I press Alt+U to enter url
> selecting mode and after that the terminal ignores any input (tried
> Esc, different combinations, but no luck, it was just frozen). The
> same with tabbedex extension when I try to rename tab.
> For example in tabbedex the problem starts when sub tab_key_press
> returns 1 instead of ()
> After that the $keysym:
> >sub tab_key_press {
> > my ($self, $tab, $event, $keysym, $str) = @_;
> the $keysym is always empty after tab_key_press returns 1 instead of ()
>
> Maybe you've got ideas why this could happen?
>
>
>
>
> _______________________________________________
> rxvt-unicode mailing list
> rxvt-unicode at lists.schmorp.de
> http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode
>
More information about the rxvt-unicode
mailing list