Re: Req: X mousesupport detection

Hi, Martin!

> currently, mc looks at the value of the TERM environment to determine
> if mouse support should be enabled.

Indeed, the mouse doesn't work with TERM=rxvt.  Another piece of
half-baked code :-(

> Could this capability be detected from the terminfo database or such?

Yes, I think so.  There is a "kmous" capability in terminfo.  I cannot
find anything useful in termcap.

I think a good solution would be the following:

- if termcap is used and terminfo is not available use the old approach
- implement tigetstr (from ncurses) in slint.c
- use tigetstr("kmous") to check that the mouse is supported
- use the result of tigetstr("kmous") in init_mouse() instead of
  hardcoding "\e[M"

Pavel Roskin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]