Re: [code] [textadept] Curses scrollbars

From: Mitchell <m.att.foicica.com>
Date: Fri, 5 Dec 2014 11:53:49 -0500 (EST)

Hi Chris,

On Thu, 4 Dec 2014, Chris Emerson wrote:

> Hi Mitchell,
>
> I really like the new Curses improvements in 7.8 beta - it feels like a big
> improvement, thanks! I particularly like the details like the visual
> whitespace and wrap markers, and the mouse integration works really well.
>
> One little annoyance: you can't drag the scroll bar in a non-focused view;
> the first click instead focuses that view, and then dragging works.
>
> I note that selecting text in an unfocused view also behaves slightly
> differently to the GUI version - as above the first time acts as the
> focus-moving click, and then you can select. (In the GUI it selects and
> focuses at the same time).

When the mouse is pressed, the mouse event is sent to the currently
focused view. If the view determines the mouse event happened outside of
it (which is the case for what you've been reporting), then the view
discards the event, and Lua gets a chance to handle it (which it does, by
focusing the view clicked on). Subsequent mouse events are then sent to
the newly focused view, and scrolls and selections will occur normally.

In order to match GUI behavior completely, Textadept's C core must
determine where the click occurred and focus the proper view (if
necessary) before sending the mouse click to the view. This duplicates the
Lua mouse handling code already in place, so I'm not sure how I feel about
it. (The Lua mouse handling is based on your code and is required for
split view dragging at least.)

Do you have any thoughts on this?

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Fri 05 Dec 2014 - 11:53:49 EST

This archive was generated by hypermail 2.2.0 : Sat 06 Dec 2014 - 06:35:36 EST