From 2553f20466d7be83431dc8f79ee4ddace1cdcd08 Mon Sep 17 00:00:00 2001 From: Khoa Vo Date: Thu, 2 Jul 2026 14:54:22 +0700 Subject: [PATCH] password: call check_password_field() instead of stale cached is_password_field() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The keymap and evdev paths were calling is_password_field() which returns the cached value from AppStateManager. But check_password_field() (the fresh AT-SPI2 check) was never called in these paths, so password detection always returned false — engine remained enabled in password fields, causing VNI processing of password input. --- daemon/src/main.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/daemon/src/main.rs b/daemon/src/main.rs index 9297f1b..5f6b390 100644 --- a/daemon/src/main.rs +++ b/daemon/src/main.rs @@ -1245,10 +1245,11 @@ fn run_with_x11_keymap( continue; } - // Password detection — also reset buffers on transition to prevent - // stale engine content bleeding into the password field + // Password detection (fresh AT-SPI2 check) — also reset buffers + // on transition to prevent stale engine content bleeding into + // the password field (same-window field switch). if daemon.config.app_state.enabled { - let is_pw = daemon.app_state.is_password_field(); + let is_pw = daemon.app_state.check_password_field(); let currently_enabled = daemon.engine.is_enabled(); if is_pw && currently_enabled { daemon.engine.set_enabled(false); @@ -1467,11 +1468,11 @@ fn run_with_evdev( continue; } - // Password field check: disable engine if typing into a password field. - // Also reset buffers on transition to prevent stale engine content - // bleeding into the password field (same-window field switch). + // Password field check (fresh AT-SPI2 check): disable engine if typing + // into a password field. Also reset buffers on transition to prevent + // stale engine content bleeding into the password field. if value == 1 { - let is_pw = daemon.app_state.is_password_field(); + let is_pw = daemon.app_state.check_password_field(); let currently_enabled = daemon.engine.is_enabled(); if is_pw && currently_enabled { daemon.engine.set_enabled(false);