bug-ncurses
[Top][All Lists]
Advanced

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

Re: Strange change in getch behaviour when mouse click


From: Thomas Dickey
Subject: Re: Strange change in getch behaviour when mouse click
Date: Sun, 01 Dec 2013 18:28:19 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

On Sun, Dec 01, 2013 at 02:44:49AM -0800, Playerdark wrote:
> Hi,
> 
> I'm not sure if this is a bug or not because I guess it would have
> occurred earlier, but it is a mysterious behaviour for me. I am
> running NCurses 5.9 with Ada on mingw on a Windows Server 2008R2

hmm (I haven't gotten involved with Ada and MinGW...)

what is the patch-date for ncurses?

According to NEWS, I implemented the mouse code for the MinGW port
early in 2010.  "5.9" without a patch-date would be the stable
release, which is newer of course...

> machine. I have a mainloop that reads keyboard inputs. the setup is
> like so:
> 
>       Terminal_Interface.Curses.Set_Echo_Mode( Switchon => False );
>       Terminal_Interface.Curses.Set_Keypad_Mode (Win      => 
> Input_Line_Window,
>                                                  SwitchOn => True );
> 
>       Terminal_Interface.Curses.Set_Timeout_Mode (Win    => Input_Line_Window,
>                                                   Mode   => Delayed,
>                                                   Amount => 100 );
> 
> I also turn mouse events off in case a mouse is there, but this line
> reports there is no mouse:
>       IF Terminal_Interface.Curses.Mouse.Has_Mouse THEN
>          Old_Mouse_Mask    :=
> Terminal_Interface.Curses.Mouse.Start_Mouse (Mask =>
> Terminal_Interface.Curses.Mouse.No_Events);
>       END IF;
> 
> 
> 
> When I call
> 
> Terminal_Interface.Curses.Get_Keystroke ( Input_Line_Window );
> 
> this call returns immediately with or without input as it should be.
> But when I click in the command window that runs the application,
> this line blocks from now on until I press a key. I tried to reset

That sounds like a bug in the MinGW mouse support (though it would
help to have a small test-program which can be built for both the
*nix and MinGW configurations to compare).

> the timeout mode every time before I read a key but to no avail.
> Once the console was clicked with the mouse, the Get_Keystroke
> function blocks stubbormly.
> 
> I dont think its an expected behaviour but I dont know if this is a
> bug either
> 
> 
> _______________________________________________
> Bug-ncurses mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-ncurses

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]