console_flag & xterm_flag and their relation to Cygwin
Pavel Tsekov
ptsekov at gmx.net
Wed Jul 30 23:42:54 UTC 2003
Hello,
I'm currently preparing a set of patches to MC to enable some existing and
add some new functionality on the Cygwin platform. Today I've been playing
with the mouse support and it works quite well. Now before I submit a final
patch I'd like someone to clarify a part of the MC code that I cannot fully
understand. Mainly I do not fully understand the meaning of the flags xterm_flag
and console_flag. While it turns that the xterm_flag enables the Ctrl+O
functionality I cannot get the point of the console_flag. I am asking this question
since currently there is a pice of code in init_xterm_support () that
hardcodes the value of xterm_flag to 1 if Cygwin is detected. But from what I know
about Cygwin it tries to follow/emulate the linux console terminfo entry.
Now, isn't it better to use console_flag then ? On the other hand the mouse
support in the Cygwin console works by generating \E[M sequnce followed by the
mouse button state and the coordinates i.e. exactly like the xterm mouse
support. Now, I cannot decide what is the right way to enable the mouse support for
Cygwin then - should I just change the following snippet from
init_xterm_support:
if (strcmp (termvalue, "cygwin") == 0) {
force_xterm = 1;
use_mouse_p = MOUSE_DISABLED;
}
to
if (strcmp (termvalue, "cygwin") == 0) {
force_xterm = 1;
use_mouse_p = MOUSE_XTERM;
}
?
The current patch (attached) just removes the snippet above which doesnt
seem a good idea. Maybe I should set here use_mouse_p to MOUSE_NONE and the
patch will work just fine then ? I find the usage of those two flags quite
confusing ;)
Thanks!
--
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--------------------------------------------------
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mouse.diff
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20030731/c32b6b5f/attachment.diff>
More information about the mc-devel
mailing list