mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-17 05:33:52 -04:00
term: check visual-focus, not kbd-focus when enabling/disabling cursor blink
term_cursor_blink_update() is called when the visual focus changes state (i.e. when our top-level surface is activated de-activated). Checking keyboard focus worked on Sway, but on e.g. GNOME, the order in which keyboard focus and visual focus are updated is different, and we ended up either making the cursor invisible, or visible, but not blinking, when changing focus back to the window. Closes #686
This commit is contained in:
parent
9d1de74795
commit
b4402a6aa5
2 changed files with 5 additions and 2 deletions
|
|
@ -2456,11 +2456,11 @@ void
|
|||
term_cursor_blink_update(struct terminal *term)
|
||||
{
|
||||
bool enable = term->cursor_blink.decset || term->cursor_blink.deccsusr;
|
||||
bool activate = !term->shutdown.in_progress && enable && term->kbd_focus;
|
||||
bool activate = !term->shutdown.in_progress && enable && term->visual_focus;
|
||||
|
||||
LOG_DBG("decset=%d, deccsrusr=%d, focus=%d, shutting-down=%d, enable=%d, activate=%d",
|
||||
term->cursor_blink.decset, term->cursor_blink.deccsusr,
|
||||
term->kbd_focus, term->shutdown.in_progress,
|
||||
term->visual_focus, term->shutdown.in_progress,
|
||||
enable, activate);
|
||||
|
||||
if (activate && term->cursor_blink.fd < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue