Req: X mousesupport detection

Pavel Roskin proski at gnu.org
Sun Sep 2 04:22:09 UTC 2001


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"

-- 
Regards,
Pavel Roskin





More information about the mc-devel mailing list