[email protected]
[Top] [All Lists]

Re: mc-4.6.1-20060912.patch

Subject: Re: mc-4.6.1-20060912.patch
From: Pavel Tsekov
Date: Thu, 14 Sep 2006 02:10:11 +0300 EEST
On Wed, 13 Sep 2006, Thomas Dickey wrote:

> On Thu, 14 Sep 2006, Pavel Tsekov wrote:
>
>> On Wed, 13 Sep 2006, Thomas Dickey wrote:
>> 
>>> On Wed, 13 Sep 2006, Pavel Tsekov wrote:
>>> 
>>>> I do build and test MC not only on linux but also on Solaris and Cygwin 
>>>> and not so often on some other systems too. None of them use gpm.
>>> 
>>> I'm curious how you are using the mouse on Solaris then...
>> 
>> $ uname -a
>> SunOS sole 5.10 Generic_118833-18 sun4u sparc SUNW,Sun-Blade-1000
>> 
>> I configure MC as following:
>
> ...no obvious problems here
>
> But this gives some context:
>
>> I an using PuTTY 0.56 as well as rxvt (native Cygwin) to connect to the 
>> Solaris host. The mouse events are recognized and processed
>> as expected,
>
> Perhaps you're using this chunk in src/main.c:
>
>        /* Enable mouse unless explicitly disabled by --nomouse */
>        if (use_mouse_p != MOUSE_DISABLED) {
>            const char *color_term = getenv ("COLORTERM");
>            if (strncmp (termvalue, "rxvt", 4) == 0 ||
>                (color_term != NULL && strncmp (color_term, "rxvt", 4) == 0) 
> ||
>                strcmp (termvalue, "Eterm") == 0) {
>                    use_mouse_p = MOUSE_XTERM_NORMAL_TRACKING;
>            } else {
>                use_mouse_p = MOUSE_XTERM_BUTTON_EVENT_TRACKING;
>            }
>        }
>
> That doesn't work with xterm (unless you're setting $COLORTERM in your 
> shell).  COLORTERM won't be set by xterm because for instance it excludes 
> dtterm and other terminals that don't do bce. You may notice that I've 
> commented on this in more than one place. If any thought had been given to 
> that issue, perhaps it would have some usefulness.  I seem to recall a 
> comment that PuTTY does this also.

Well it does (at least for me) as far as I can tell, but I'll check
again tomorrow.

> Seeing how the use_mouse_p variable is used - saying that it works with
> ncurses is something I'm not likely to agree with, since there are too
> many counter-examples.  If it worked _with_ ncurses rather than trying to

Like what ? screen setting term to screen.xterm ? You came to this list
saying "it doesn't work and didn't work for the past four years" .

> work around it, the code would call mousemask().  From man mousemask:
>
>       To make mouse events visible, use the mousemask  function.   This 
> will
>       set  the  mouse events to be reported.  By default, no mouse events 
> are
>       reported.  The function will return a mask to  indicate  which  of 
> the
>       specified  mouse events can be reported; on complete failure it 
> returns
>       0.  If oldmask is non-NULL, this function fills the indicated 
> location
>       with the previous value of the given window's mouse event mask.

What's wrong with the current method ? As far as I can tell mousemask() is 
not available in X/Open curses. I can compile MC on Solaris and other 
systems with the native curses implementation pretty easy . Btw what does 
mousemask() more than the MC code ? How does it detect whether the terminal
can support xterm mouse reporting ? What do you think about this 
suggestion:

   http://savannah.gnu.org/bugs/?16910
_______________________________________________
Mc mailing list
http://mail.gnome.org/mailman/listinfo/mc

<Prev in Thread] Current Thread [Next in Thread>