read vs select on mouse events in console

Takashi Yano takashi.yano@nifty.ne.jp
Sat Dec 24 11:37:29 GMT 2022


On Fri, 23 Dec 2022 13:03:06 +0100
Thomas Wolff wrote:
> Am 23.12.2022 um 11:19 schrieb Takashi Yano:
> > On Fri, 23 Dec 2022 10:08:20 +0100
> > Thomas Wolff wrote:
> >> I see different behavior indeed; no further output of (0) and Windows
> >> display its message to make a mouse selection in the title bar.
> > Ah, that may be due to "Quick Edit Mode". It seems that the
> > "Quick Edit Mode" is disabled in the DECSET 1000 range, however,
> > it is enabled outside of the range. So, clicking mouse outside of
> > the range triggers the "Quick Edit Mode" then program is suspended.
> >
> > If you uncheck the "Quick Edit Mode" setting, the problem will probably disappear. Please try.
> Right, but how does Windows notice about mouse events processed by 
> cygwin, so it enters quick edit mode or not?
> Still mysterious.

Actually, mouse_aware() is not used after Win10 1703.
Mouse event is translated to ESC sequence by Windows.
ENABLE_VIRTUAL_TERMINAL_INPUT flag does that. Therefore,
Windows knows whther the mouse event is processed or not.

mouse_aware() works only if the system is before win10
1607 or legacy console mode is enabled.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>


More information about the Cygwin-developers mailing list