mc may not detect the gpm mouse under X11 on many x terminals when running together with tmux or screen.
On some cases it can even hang.
It's a small patch to the gpm maintainer to improve its checking.
Seems there is a need also to a small change on mc.
Now everything is working perfectly.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
A followup extension, "SGR 1006" was invented by xterm, to overcome some
of the shortcomings of the previous one. It is becoming as widespread as
the previous one, and is likely to soon overtake it in popularity.
Note that most of the patch is just the removal of the huge complexity
introduced by the previous one. The previous extension didn't have a
unique prefix which made the whole parsing logic extremely complicated.
The new extension does have a unique prefix, so parsing becomes a piece
of cake. The code becomes much cleaner and much easier to maintain.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>