mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
csi: focus mode (private mode 1004): send focus event immediate, when enabled
This lets the application now the current state, without having to wait for the user to switch focus. Fixes #2202
This commit is contained in:
parent
143f220527
commit
9728ada028
2 changed files with 10 additions and 0 deletions
|
|
@ -70,6 +70,14 @@
|
||||||
## Unreleased
|
## Unreleased
|
||||||
### Added
|
### Added
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
* When enabling _"focus mode"_ (private mode 1004), foot now sends a
|
||||||
|
focus event immediately, to inform the application what the current
|
||||||
|
state is ([#2202][2202]).
|
||||||
|
|
||||||
|
[2202]: https://codeberg.org/dnkl/foot/issues/2202
|
||||||
|
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
### Removed
|
### Removed
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
||||||
2
csi.c
2
csi.c
|
|
@ -422,6 +422,8 @@ decset_decrst(struct terminal *term, unsigned param, bool enable)
|
||||||
|
|
||||||
case 1004:
|
case 1004:
|
||||||
term->focus_events = enable;
|
term->focus_events = enable;
|
||||||
|
if (enable)
|
||||||
|
term_to_slave(term, term->kbd_focus ? "\033[I" : "\033[O", 3);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1005:
|
case 1005:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue