bug-ncurses
[Top][All Lists]
Advanced

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

Strange change in getch behaviour when mouse click


From: Playerdark
Subject: Strange change in getch behaviour when mouse click
Date: Sun, 01 Dec 2013 02:44:49 -0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

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 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 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




reply via email to

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