Report initial mouse state?
Similarly to how VTE modified the Focus In/Out mode to report the initial state, shouldn't we do that with mouse, too?
When enabling mode 9, 1000 or 1002, if some buttons are being held down, I guess we could report those as clicks. (If no button is pressed, as most of the time, then no report necessary.)
When enabling mode 1003, even when no button is held down, we should probably report the mouse location. I've come across this question saying
Whe I use the python textual module's button widgets, it can detect the hovering position of the mouse in my terminal, and when it is over a button, the button would change its color
Whatever this "python textual module" is, I guess its button widgets should be colored properly when such an application starts up and the user hasn't moved the mouse yet.
(Mind you, these mouse protocols suffer from not being able to report if the mouse is outside of the terminal area. What would the initial report say, then? Would it be okay to report offscreen (0,0)
coordinates then, bearing in mind that the top-left cell is (1,1)
? See also #2226.)