aboutsummaryrefslogtreecommitdiff
path: root/common/terminal.c
AgeCommit message (Collapse)Author
2022-03-29terminal: Revert FreeBSD behavior in set_keyboardKenny Levinsen
4ad48cb305b3f847ab7d3c2d3f59c27007519c77 introduced support for NetBSD, which modified a number of our ifdefs. In that process, FreeBSD was accidentally excluded from an important code path that controls keyboard usage on the kernel console. Revert part of that change to restore FreeBSD behavior.
2022-03-16Initial netbsd supportilliliti
2021-09-21clang-format: Fix alignmentKenny Levinsen
2021-03-02Normalize log texts a bitKenny Levinsen
2020-11-23terminal: Improve loggingKenny Levinsen
2020-09-22terminal: Ack both release and acquireKenny Levinsen
Linux only requires acking release and ignores ack of acquire, but FreeBSD is more stringent and will patiently wait for both to be acked. Implement proper acking for both events.
2020-09-22terminal: Fix VT numbering on FreeBSDKenny Levinsen
FreeBSD adds one to the VT number returned by the GET_ACTIVE ioctl, so to match things up, the wrapper here subtracted by one. This lead to ttyv0 being named VT 0. This had the side-effect of VT numbering not matching expectations, and switching not behaving as intended. Align numbers with expectations, and move the required subtraction to terminal_open, so that VT 1 matches ttyv0.
2020-08-28terminal: Explain FreeBSD current_vt behaviorKenny Levinsen
2020-08-28terminal: Construct TTY paths correctly on FreeBSDKenny Levinsen
FreeBSD TTY paths are contructed in the kernel using the %r formatter, which in this case ends up being a base 32 encoding. The base 32 implementation is taken more or less directly from wlroots commit fc6c0ca12e94.
2020-08-28terminal: FreeBSD VT num is 1 higher than tty numKenny Levinsen
This was causing all VT and TTY changes to be applied to the wrong TTY.
2020-08-28terminal: Set K_RAW and term raw mode on FreeBSDKenny Levinsen
Taken from X11, weston and consolekit2 ports for FreeBSD. Setting just K_CODE as done before makes input seemingly have no ill effects, but it is still buffered and possibly send to the terminal after application exit if stdin is never drained. Setting raw mode appears to be needed to solve that issue. A K_OFF-like VT keyboard setting like Linux has would seem more appropriate, but that is not currently available to us on FreeBSD.
2020-08-02seat: Open/close tty on activation/deactivationKenny Levinsen
The VT and KD ioctl's are picky about the tty fd used. In order to satisfy these, and to improve state cleanup, we now only and store the current tty when opening a client, and use this fd to perform teardown later. The presence of the fd is also used to signal that teardown is needed.
2020-08-02terminal: Correctly set K_ON on keyboard enableKenny Levinsen
2020-08-01client: Implement get_peer for FreeBSDKenny Levinsen
2020-08-01terminal: FreeBSD VT and KD handlingKenny Levinsen
2020-07-31Initial implementation of seatd and libseatKenny Levinsen