mouse wheel / vt100
gibboris at gmail.com
gibboris at gmail.com
Tue Sep 29 09:22:03 CEST 2009
Replying myself :
I didn't look at the doc enough, the underlined part particularly.
Returning () rather than 1 did the trick :)
sorry for noise
Raph
On Tue, Sep 29, 2009 at 09:01:32AM +0200, gibboris at gmail.com wrote:
> Hello,
> I looking for an advice as the previously posted extensions shows some
> problems :
> The double-click to select the part of a line seems disabled when I load
> this extension.
> Moreover, if I start to select something, I cannot stop selecting-mode whatever
> I click with my mouse.
>
> My guess is that the on_button_press override the others actions for the
> given event rather than adding itself to the actions queue for this event.
>
> Any idea ?
>
> Raph
> > sub on_start {
> > my ($self) = @_;
> >
> > $self->{onmouseup} = $self->x_resource ("onmouseup");
> > $self->{onmousedown} = $self->x_resource ("onmousedown");
> >
> > if ( ! $self->{onmouseup}) {
> > warn "wheel extension: no 'onmouseup' resource event configured";
> > }
> > if ( ! $self->{onmousedown}) {
> > warn "wheel extension: no 'onmousedown' resource event configured";
> > }
> >
> > ()
> > }
> >
> > sub on_button_press {
> > my ($self, $event) = @_;
> >
> > if ($event->{button} == 4 && $self->{onmouseup}) {
> > $self->tt_write($self->locale_encode($self->{onmouseup}));
> > }
> > if ($event->{button} == 5 && $self->{onmousedown}) {
> > $self->tt_write($self->locale_encode($self->{onmousedown}));
> > }
> >
> > # 1 : no
> > # do NOT consume the event
> > ()
> > }
> >
More information about the rxvt-unicode
mailing list