Add public API to get the state for focus in/out reporting

Bug #1852009 reported by Martin Hostettler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvterm
Fix Released
Undecided
Unassigned

Bug Description

Currently the status of focus in/out reporting in only available internally in libvterm to suppress reporting in vterm_state_focus_in/vterm_state_focus_out.

It would be useful to be able to query this state for libvtermdriver (a program to do automated testing for terminal interaction).

Revision history for this message
Martin Hostettler (textshell) wrote :

I've implemented this in 2 variants now. I was not sure if this should be exposed as a simple getter `vterm_state_focus_reporting_enabled` or via a VTermProp. So i implemented both.

See attached patches.

Revision history for this message
Martin Hostettler (textshell) wrote :
Revision history for this message
Paul "LeoNerd" Evans (leonerd) wrote :

It seems neatest to do it as a termprop; that way applications can be informed when its value changes (in case they need to hook up extra event handlers, etc...)

I'll take the first one, though renamed `VTERM_PROP_FOCUSREPORT` since none of the other props (e.g. cursor-related ones) have additional underscores in parts of the names.

It also needs some tests, which I shall add.

Revision history for this message
Paul "LeoNerd" Evans (leonerd) wrote :

838: Paul "LeoNerd" Evans 2023-08-03 Implement a VTERM_PROP_FOCUSREPORT so applications can be told when focus reporting is enabled (LP1852009)

Changed in libvterm:
status: New → Fix Committed
Revision history for this message
Paul "LeoNerd" Evans (leonerd) wrote :

Fixed in v0.3.3

Changed in libvterm:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.