On Windows pause mouse had several issues for many terminals (qt, windows, caca), which should be fixed by the attached patch:
The windows terminal expects the end of a pause mouse condition to be handled by the code in mouse.c. This was in conflict with recent changes to be able to bind to mouse button1 (4.6.6 / 5.0). Other interactive terminals (wxt/x11/qt) handle the end of pause mouse in their waitforinput routine. While this is not a clean design in my opinion, the windows code was changed to reset paused_for_mouse in a similar way.
Morevover the windows terminal now re-maps events from inactive windows and avoids sending events at all if it is not the active terminal.
pause mouse was realized using a hidden dialog box which was not dismissed properly in all code paths when ending the pause. In the attached patch the code was replaced which eliminates a lot of kill_pending_pause_dialog() calls.
The Windows specific code in pause_command() was rather convoluted and failed to handle the qt and caca terminals. The new code in win/wpause.c is considerably simpler. Interrupting pause mouse via Ctrl-C should now be possible.
The windows terminal always bailed to the command line when the graph window was closed during pause mouse.
The caca terminal waitforinput() routine failed to handle the pause mouse case.
The new code does not handle the case when no window is open yet.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
On Windows
pause mousehad several issues for many terminals (qt, windows, caca), which should be fixed by the attached patch:The windows terminal expects the end of a
pause mousecondition to be handled by the code in mouse.c. This was in conflict with recent changes to be able to bind to mouse button1 (4.6.6 / 5.0). Other interactive terminals (wxt/x11/qt) handle the end ofpause mousein their waitforinput routine. While this is not a clean design in my opinion, the windows code was changed to reset paused_for_mouse in a similar way.Morevover the windows terminal now re-maps events from inactive windows and avoids sending events at all if it is not the active terminal.
pause mousewas realized using a hidden dialog box which was not dismissed properly in all code paths when ending the pause. In the attached patch the code was replaced which eliminates a lot of kill_pending_pause_dialog() calls.The Windows specific code in pause_command() was rather convoluted and failed to handle the qt and caca terminals. The new code in win/wpause.c is considerably simpler. Interrupting
pause mousevia Ctrl-C should now be possible.The windows terminal always bailed to the command line when the graph window was closed during
pause mouse.The caca terminal waitforinput() routine failed to handle the
pause mousecase.The new code does not handle the case when no window is open yet.
In CVS for version 5.1. Eventually, this should also be included in 5.0 but needs some testing first.
Ethan backported the fixes to 5.0 (except the caca.trm changes).