[haiku-commits] Re: r39589 - haiku/trunk/src/apps/terminal

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 23 Nov 2010 20:11:02 +0100

On 2010-11-23 at 19:21:13 [+0100], Stephan Aßmus <superstippi@xxxxxx> wrote:
> Am Dienstag, den 23.11.2010, 18:49 +0100 schrieb ingo_weinhold@xxxxxx:
> > +        case B_MOUSE_WHEEL_CHANGED:
> > +        {
> > +            // overridden to allow scrolling emulation in alternative 
> > screen
> > +            // mode
> > +            BAutolock locker(fTextBuffer);
> > +            float deltaY = 0;
> > +            if (fTextBuffer->IsAlternateScreenActive()
> > +                && msg->FindFloat("be:wheel_delta_y", &deltaY) == B_OK
> > +                && deltaY != 0) {
> 
> [...]
> 
> > +            } else {
> > +                // let the BView's implementation handle the standard 
> > scrolling
> > +                locker.Unlock();
> > +                BView::MessageReceived(msg);
> > +            }
> 
> Do you still want the BView to handle the scrolling when you can't parse
> the B_MOUSE_WHEEL_CHANGED message of the delta is 0? I would reword the
> if clause to only let the BView handle it if the alternate screen mode
> is not currently in effect.

I considered that, but decided in favor of a conservative approach. I.e. if 
we don't handle it (for whatever reason), let BView do it. E.g. should we 
ever make changes that make horizontal scrolling possible, the current 
implementation would still work fine, while it doesn't do any harm now.

CU, Ingo

Other related posts: